[][src]Struct alloc_compose::region::IntrusiveRegion

pub struct IntrusiveRegion<'mem> { /* fields omitted */ }

An intrusive region allocator, which stores the current posision in the provided memory.

It holds a lifetime to the provided memory block, which ensures, that the allocator does not outlive the underlying memory.

For a version without lifetime see RawIntrusiveRegion instead.

Implementations

impl<'mem> IntrusiveRegion<'mem>[src]

pub fn new(memory: &'mem mut [MaybeUninit<u8>]) -> Self[src]

Creates a new region from the given memory block.

Panics

This function panics, when memory is not large enough to properly store a pointer.

Trait Implementations

impl<'_> AllocRef for IntrusiveRegion<'_>[src]

impl<'_> AllocateAll for IntrusiveRegion<'_>[src]

impl<'mem> Clone for IntrusiveRegion<'mem>[src]

impl<'_> GlobalAlloc for IntrusiveRegion<'_>[src]

impl<'_> Owns for IntrusiveRegion<'_>[src]

impl<'_> PartialEq<IntrusiveRegion<'_>> for IntrusiveRegion<'_>[src]

impl<'_> PartialEq<IntrusiveRegion<'_>> for RawIntrusiveRegion[src]

impl<'_> PartialEq<RawIntrusiveRegion> for IntrusiveRegion<'_>[src]

Auto Trait Implementations

impl<'mem> !Send for IntrusiveRegion<'mem>

impl<'mem> !Sync for IntrusiveRegion<'mem>

impl<'mem> Unpin for IntrusiveRegion<'mem>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.