[][src]Struct incinerator::Heap

pub struct Heap<Hdr: 'static> { /* fields omitted */ }

A garbage-collected heap. See the module-level docs for more information about the garbage collection algorithm.

Implementations

impl<Hdr: 'static> Heap<Hdr>[src]

pub fn start(self: Pin<Arc<Heap<Hdr>>>) -> HeapRegistration<Hdr>[src]

Start using this heap on this thread, pinning the heap until the final HeapRegistration created on this thread is dropped.

Returns None if we are already using this thread. If this is the first time start is called on this thread, blocks until the garbage collector stops its current collection and lets us enter the thread list.

pub fn new() -> Pin<Arc<Heap<Hdr>>>[src]

Create a new managed heap sourcing blocks from the system allocator.

pub fn from_alloc(alloc: Box<dyn GlobalAlloc + Send>) -> Pin<Arc<Heap<Hdr>>>[src]

Create a garbage collected heap which uses alloc as a sub-allocator for large blocks which the garbage collector then splits and manages. alloc may be called from different threads.

Trait Implementations

impl<Hdr: Debug + 'static> Debug for Heap<Hdr>[src]

Auto Trait Implementations

impl<Hdr> !RefUnwindSafe for Heap<Hdr>

impl<Hdr> !Send for Heap<Hdr>

impl<Hdr> !Sync for Heap<Hdr>

impl<Hdr> Unpin for Heap<Hdr>

impl<Hdr> !UnwindSafe for Heap<Hdr>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.