[][src]Trait alloc_wg::alloc::AllocRef

pub trait AllocRef: Sized {
    type BuildAlloc: BuildAlloc<AllocRef = Self>;
    type Error;
    fn get_build_alloc(&mut self) -> Self::BuildAlloc;
fn alloc(
        &mut self,
        layout: NonZeroLayout
    ) -> Result<NonNull<u8>, Self::Error>; fn alloc_zeroed(
        &mut self,
        layout: NonZeroLayout
    ) -> Result<NonNull<u8>, Self::Error> { ... } }

Associated Types

type BuildAlloc: BuildAlloc<AllocRef = Self>

type Error

Loading content...

Required methods

fn get_build_alloc(&mut self) -> Self::BuildAlloc

fn alloc(&mut self, layout: NonZeroLayout) -> Result<NonNull<u8>, Self::Error>

Loading content...

Provided methods

fn alloc_zeroed(
    &mut self,
    layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>

Loading content...

Implementations on Foreign Types

impl AllocRef for System[src]

type BuildAlloc = Self

type Error = AllocErr

Loading content...

Implementors

impl AllocRef for Global[src]

type BuildAlloc = Self

type Error = AllocErr

impl<A: AllocRef> AllocRef for AbortAlloc<A>[src]

type BuildAlloc = AbortAlloc<A::BuildAlloc>

type Error = Never

Loading content...