[−][src]Struct context_allocator::AllocToAllocatorAdaptor
Adapts implementations of Alloc
to Allocator
.
Trait Implementations
impl<A: Alloc> Allocator for AllocToAllocatorAdaptor<A>
[src]
fn allocate(
&self,
non_zero_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize
) -> Result<NonNull<u8>, AllocErr>
[src]
&self,
non_zero_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize
) -> Result<NonNull<u8>, AllocErr>
fn deallocate(
&self,
non_zero_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
current_memory: NonNull<u8>
)
[src]
&self,
non_zero_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
current_memory: NonNull<u8>
)
fn growing_reallocate(
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: NonNull<u8>
) -> Result<NonNull<u8>, AllocErr>
[src]
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: NonNull<u8>
) -> Result<NonNull<u8>, AllocErr>
fn shrinking_reallocate(
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: NonNull<u8>
) -> Result<NonNull<u8>, AllocErr>
[src]
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: NonNull<u8>
) -> Result<NonNull<u8>, AllocErr>
const ZeroSizedAllocation: NonNull<u8>
[src]
The sentinel value used for a zero-sized allocation.
fn adapt<'a>(&'a self) -> AllocatorAdaptor<'a, Self>
[src]
Adapts to a GlobalAlloc
and Alloc
.
fn adapt_reference<'a>(&'a self) -> &'a AllocatorAdaptor<'a, Self>
[src]
Adapts a reference to a GlobalAlloc
and Alloc
reference.
impl<A: Alloc> Debug for AllocToAllocatorAdaptor<A>
[src]
impl<A: Alloc> Deref for AllocToAllocatorAdaptor<A>
[src]
Auto Trait Implementations
impl<A> Send for AllocToAllocatorAdaptor<A> where
A: Send,
A: Send,
impl<A> !Sync for AllocToAllocatorAdaptor<A>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,