[][src]Struct swim_c::stdlib::MallocHold

pub struct MallocHold<'a> { /* fields omitted */ }

Managed allocator backed by libc malloc.

Methods

impl<'a> MallocHold<'a>[src]

pub fn new() -> Result<RawBox<'a, MallocHold<'a>>, HoldError>[src]

Returns an owned reference to a new Hold that allocates memory blocks using libc malloc.

pub fn global() -> &'a MallocHold<'a>[src]

Returns a reference to a Hold that allocates memory using libc malloc.

pub fn live(&self) -> usize[src]

Returns the number of currently allocated memory blocks in this MallocHold.

pub fn used(&self) -> usize[src]

Returns the number of bytes currently allocated in this MallocHold.

Trait Implementations

impl<'a> Sync for MallocHold<'a>[src]

impl<'a> Send for MallocHold<'a>[src]

impl<'a> Reify<'a, dyn Hold<'a> + 'a> for MallocHold<'a>[src]

impl<'a> Hold<'a> for MallocHold<'a>[src]

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<'b, S, T> StowFrom for T where
    S: Stow<'b, T>, 
[src]

default fn stow_from(value: T, hold: &dyn Hold<'b>) -> Self[src]

impl<'b, S, T> StowInto for S where
    T: StowFrom<'b, S>, 
[src]

default fn stow_into(self, hold: &dyn Hold<'b>) -> T[src]