[−][src]Struct alloc_wg::alloc::AbortAlloc
An allocator, which wraps another allocator and aborts on OOM.
Trait Implementations
impl<A: BuildAllocRef> BuildAllocRef for AbortAlloc<A>
[src]
type Ref = AbortAlloc<A::Ref>
unsafe fn build_alloc_ref(
&mut self,
ptr: NonNull<u8>,
layout: Option<NonZeroLayout>
) -> Self::Ref
[src]
&mut self,
ptr: NonNull<u8>,
layout: Option<NonZeroLayout>
) -> Self::Ref
impl<A: DeallocRef> DeallocRef for AbortAlloc<A>
[src]
type BuildAlloc = AbortAlloc<A::BuildAlloc>
fn get_build_alloc(&mut self) -> Self::BuildAlloc
[src]
unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: NonZeroLayout)
[src]
impl<A: AllocRef> AllocRef for AbortAlloc<A>
[src]
type Error = Never
fn alloc(&mut self, layout: NonZeroLayout) -> Result<NonNull<u8>, Self::Error>
[src]
fn alloc_zeroed(
&mut self,
layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
[src]
&mut self,
layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
fn usable_size(&self, layout: NonZeroLayout) -> (usize, usize)
[src]
unsafe fn grow_in_place(
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
[src]
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
unsafe fn shrink_in_place(
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
[src]
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
impl<A: ReallocRef> ReallocRef for AbortAlloc<A>
[src]
unsafe fn realloc(
&mut self,
ptr: NonNull<u8>,
old_layout: NonZeroLayout,
new_layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
[src]
&mut self,
ptr: NonNull<u8>,
old_layout: NonZeroLayout,
new_layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
impl<A: Clone> Clone for AbortAlloc<A>
[src]
fn clone(&self) -> AbortAlloc<A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<A: Copy> Copy for AbortAlloc<A>
[src]
impl<A: Default> Default for AbortAlloc<A>
[src]
fn default() -> AbortAlloc<A>
[src]
Auto Trait Implementations
impl<A> Send for AbortAlloc<A> where
A: Send,
A: Send,
impl<A> Sync for AbortAlloc<A> where
A: Sync,
A: Sync,
impl<A> Unpin for AbortAlloc<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for AbortAlloc<A> where
A: UnwindSafe,
A: UnwindSafe,
impl<A> RefUnwindSafe for AbortAlloc<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,