Skip to main content

WithoutShrink

Struct WithoutShrink 

Source
pub struct WithoutShrink<A>(pub A);
Expand description

Wraps a bump allocator and does nothing on shrink.

This type only implements Allocator for wrapped types that implement BumpAllocatorCore, so you don’t accidentally leak memory.

Tuple Fields§

§0: A

Trait Implementations§

Source§

impl<A: BumpAllocatorCore> Allocator for WithoutShrink<A>

Available on crate feature nightly-allocator-api only.
Source§

fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, TargetAllocError>

🔬This is a nightly-only experimental API. (allocator_api)
Attempts to allocate a block of memory. Read more
Source§

unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)

🔬This is a nightly-only experimental API. (allocator_api)
Deallocates the memory referenced by ptr. Read more
Source§

unsafe fn grow( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

🔬This is a nightly-only experimental API. (allocator_api)
Attempts to extend the memory block. Read more
Source§

unsafe fn grow_zeroed( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

🔬This is a nightly-only experimental API. (allocator_api)
Behaves like grow, but also ensures that the new contents are set to zero before being returned. Read more
Source§

unsafe fn shrink( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

🔬This is a nightly-only experimental API. (allocator_api)
Attempts to shrink the memory block. Read more
Source§

fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>

🔬This is a nightly-only experimental API. (allocator_api)
Behaves like allocate, but also ensures that the returned memory is zero-initialized. Read more
Source§

fn by_ref(&self) -> &Self
where Self: Sized,

🔬This is a nightly-only experimental API. (allocator_api)
Creates a “by reference” adapter for this instance of Allocator. Read more
Source§

impl<A: BumpAllocatorCore> Allocator for WithoutShrink<A>

Available on crate feature allocator-api2-03 only.
Source§

fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, TargetAllocError>

Attempts to allocate a block of memory. Read more
Source§

unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)

Deallocates the memory referenced by ptr. Read more
Source§

unsafe fn grow( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

Attempts to extend the memory block. Read more
Source§

unsafe fn grow_zeroed( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

Behaves like grow, but also ensures that the new contents are set to zero before being returned. Read more
Source§

unsafe fn shrink( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

Attempts to shrink the memory block. Read more
Source§

fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>

Behaves like allocate, but also ensures that the returned memory is zero-initialized. Read more
Source§

fn by_ref(&self) -> &Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Allocator. Read more
Source§

impl<A: BumpAllocatorCore> Allocator for WithoutShrink<A>

Available on crate feature allocator-api2-04 only.
Source§

fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, TargetAllocError>

Attempts to allocate a block of memory. Read more
Source§

unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)

Deallocates the memory referenced by ptr. Read more
Source§

unsafe fn grow( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

Attempts to extend the memory block. Read more
Source§

unsafe fn grow_zeroed( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

Behaves like grow, but also ensures that the new contents are set to zero before being returned. Read more
Source§

unsafe fn shrink( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, TargetAllocError>

Attempts to shrink the memory block. Read more
Source§

fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>

Behaves like allocate, but also ensures that the returned memory is zero-initialized. Read more
Source§

fn by_ref(&self) -> &Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Allocator. Read more
Source§

impl<A: BumpAllocatorCore> Allocator for WithoutShrink<A>

Source§

fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>

Attempts to allocate a block of memory. Read more
Source§

fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>

Behaves like allocate, but also ensures that the returned memory is zero-initialized. Read more
Source§

unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)

Deallocates the memory referenced by ptr. Read more
Source§

unsafe fn grow( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>

Attempts to extend the memory block. Read more
Source§

unsafe fn grow_zeroed( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>

Behaves like grow, but also ensures that the new contents are set to zero before being returned. Read more
Source§

unsafe fn shrink( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>

Attempts to shrink the memory block. Read more
Source§

fn by_ref(&self) -> &Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Allocator. Read more
Source§

impl<B: BumpAllocatorCore> BumpAllocatorCore for WithoutShrink<B>

Source§

fn any_stats(&self) -> AnyStats<'_>

Returns a type which provides statistics about the memory usage of the bump allocator.
Source§

fn checkpoint(&self) -> Checkpoint

Creates a checkpoint of the current bump position. Read more
Source§

unsafe fn reset_to(&self, checkpoint: Checkpoint)

Resets the bump position to a previously created checkpoint. The memory that has been allocated since then will be reused by future allocations. Read more
Source§

fn is_claimed(&self) -> bool

Returns true if the bump allocator is currently claimed.
Source§

fn prepare_allocation( &self, layout: Layout, ) -> Result<Range<NonNull<u8>>, AllocError>

Returns a pointer range of free space in the bump allocator with a size of at least layout.size(). Read more
Source§

unsafe fn allocate_prepared( &self, layout: Layout, range: Range<NonNull<u8>>, ) -> NonNull<u8>

Allocate part of the free space returned from a prepare_allocation call. Read more
Source§

fn prepare_allocation_rev( &self, layout: Layout, ) -> Result<Range<NonNull<u8>>, AllocError>

Returns a pointer range of free space in the bump allocator with a size of at least layout.size(). Read more
Source§

unsafe fn allocate_prepared_rev( &self, layout: Layout, range: Range<NonNull<u8>>, ) -> NonNull<u8>

Allocate part of the free space returned from a prepare_allocation_rev call starting at the end. Read more
Source§

impl<B: BumpAllocatorTyped> BumpAllocatorTyped for WithoutShrink<B>

Source§

type TypedStats<'b> = <B as BumpAllocatorTyped>::TypedStats<'b> where Self: 'b

The type returned by the stats method.
Source§

fn typed_stats(&self) -> Self::TypedStats<'_>

Returns a type which provides statistics about the memory usage of the bump allocator.
Source§

fn allocate_layout(&self, layout: Layout) -> NonNull<u8>

A specialized version of allocate. Read more
Source§

fn try_allocate_layout(&self, layout: Layout) -> Result<NonNull<u8>, AllocError>

A specialized version of allocate. Read more
Source§

fn allocate_sized<T>(&self) -> NonNull<T>

A specialized version of allocate. Read more
Source§

fn try_allocate_sized<T>(&self) -> Result<NonNull<T>, AllocError>

A specialized version of allocate. Read more
Source§

fn allocate_slice<T>(&self, len: usize) -> NonNull<T>

A specialized version of allocate. Read more
Source§

fn try_allocate_slice<T>(&self, len: usize) -> Result<NonNull<T>, AllocError>

A specialized version of allocate. Read more
Source§

fn allocate_slice_for<T>(&self, slice: &[T]) -> NonNull<T>

A specialized version of allocate. Read more
Source§

fn try_allocate_slice_for<T>( &self, slice: &[T], ) -> Result<NonNull<T>, AllocError>

A specialized version of allocate. Read more
Source§

unsafe fn shrink_slice<T>( &self, ptr: NonNull<T>, old_len: usize, new_len: usize, ) -> Option<NonNull<T>>

A specialized version of shrink. Read more
Source§

fn prepare_slice_allocation<T>(&self, len: usize) -> NonNull<[T]>

A specialized version of prepare_allocation. Read more
Source§

fn try_prepare_slice_allocation<T>( &self, len: usize, ) -> Result<NonNull<[T]>, AllocError>

A specialized version of prepare_allocation. Read more
Source§

unsafe fn allocate_prepared_slice<T>( &self, ptr: NonNull<T>, len: usize, cap: usize, ) -> NonNull<[T]>

A specialized version of allocate_prepared. Read more
Source§

fn prepare_slice_allocation_rev<T>(&self, len: usize) -> (NonNull<T>, usize)

A specialized version of prepare_allocation_rev. Read more
Source§

fn try_prepare_slice_allocation_rev<T>( &self, len: usize, ) -> Result<(NonNull<T>, usize), AllocError>

A specialized version of prepare_allocation_rev. Read more
Source§

unsafe fn allocate_prepared_slice_rev<T>( &self, ptr: NonNull<T>, len: usize, cap: usize, ) -> NonNull<[T]>

A specialized version of allocate_prepared_rev. Read more
Source§

fn reserve(&self, additional: usize)

Reserves capacity for at least additional more bytes to be bump allocated. The bump allocator may reserve more space to avoid frequent reallocations. After calling reserve, self.stats().remaining() will be greater than or equal to additional. Does nothing if the capacity is already sufficient. Read more
Source§

fn try_reserve(&self, additional: usize) -> Result<(), AllocError>

Reserves capacity for at least additional more bytes to be bump allocated. The bump allocator may reserve more space to avoid frequent reallocations. After calling reserve, self.stats().remaining() will be greater than or equal to additional. Does nothing if the capacity is already sufficient. Read more
Source§

fn dealloc<T: ?Sized>(&self, boxed: BumpBox<'_, T>)

Drops an allocated value and attempts to free its memory. Read more
Source§

impl<A: Clone> Clone for WithoutShrink<A>

Source§

fn clone(&self) -> WithoutShrink<A>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A: Debug> Debug for WithoutShrink<A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A: Default> Default for WithoutShrink<A>

Source§

fn default() -> WithoutShrink<A>

Returns the “default value” for a type. Read more
Source§

impl<A: Hash> Hash for WithoutShrink<A>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<A: Ord> Ord for WithoutShrink<A>

Source§

fn cmp(&self, other: &WithoutShrink<A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<A: PartialEq> PartialEq for WithoutShrink<A>

Source§

fn eq(&self, other: &WithoutShrink<A>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A: PartialOrd> PartialOrd for WithoutShrink<A>

Source§

fn partial_cmp(&self, other: &WithoutShrink<A>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, B: BumpAllocatorCoreScope<'a>> BumpAllocatorCoreScope<'a> for WithoutShrink<B>

Source§

impl<A: Copy> Copy for WithoutShrink<A>

Source§

impl<A: Eq> Eq for WithoutShrink<A>

Source§

impl<A: MutBumpAllocatorCore> MutBumpAllocatorCore for WithoutShrink<A>

Source§

impl<A> StructuralPartialEq for WithoutShrink<A>

Auto Trait Implementations§

§

impl<A> Freeze for WithoutShrink<A>
where A: Freeze,

§

impl<A> RefUnwindSafe for WithoutShrink<A>
where A: RefUnwindSafe,

§

impl<A> Send for WithoutShrink<A>
where A: Send,

§

impl<A> Sync for WithoutShrink<A>
where A: Sync,

§

impl<A> Unpin for WithoutShrink<A>
where A: Unpin,

§

impl<A> UnwindSafe for WithoutShrink<A>
where A: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'a, B> BumpAllocatorTypedScope<'a> for B

Source§

fn alloc<T>(&self, value: T) -> BumpBox<'a, T>

Allocate an object. Read more
Source§

fn try_alloc<T>(&self, value: T) -> Result<BumpBox<'a, T>, AllocError>

Allocate an object. Read more
Source§

fn alloc_with<T>(&self, f: impl FnOnce() -> T) -> BumpBox<'a, T>

Allocates space for an object, then calls f to produce the value to be put in that place. Read more
Source§

fn try_alloc_with<T>( &self, f: impl FnOnce() -> T, ) -> Result<BumpBox<'a, T>, AllocError>

Allocates space for an object, then calls f to produce the value to be put in that place. Read more
Source§

fn alloc_default<T: Default>(&self) -> BumpBox<'a, T>

Allocate an object with its default value. Read more
Source§

fn try_alloc_default<T: Default>(&self) -> Result<BumpBox<'a, T>, AllocError>

Allocate an object with its default value. Read more
Source§

fn alloc_clone<T: CloneToUninit + ?Sized>(&self, value: &T) -> BumpBox<'a, T>

Available on crate feature nightly-clone-to-uninit only.
Allocate an object by cloning it. Read more
Source§

fn try_alloc_clone<T: CloneToUninit + ?Sized>( &self, value: &T, ) -> Result<BumpBox<'a, T>, AllocError>

Available on crate feature nightly-clone-to-uninit only.
Allocate an object by cloning it. Read more
Source§

fn alloc_uninit<T>(&self) -> BumpBox<'a, MaybeUninit<T>>

Allocate an uninitialized object. Read more
Source§

fn try_alloc_uninit<T>(&self) -> Result<BumpBox<'a, MaybeUninit<T>>, AllocError>

Allocate an uninitialized object. Read more
Source§

fn alloc_slice_move<T>( &self, slice: impl OwnedSlice<Item = T>, ) -> BumpBox<'a, [T]>

Allocate a slice and fill it by moving elements from an existing slice. Read more
Source§

fn try_alloc_slice_move<T>( &self, slice: impl OwnedSlice<Item = T>, ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocate a slice and fill it by moving elements from an existing slice. Read more
Source§

fn alloc_slice_copy<T: Copy>(&self, slice: &[T]) -> BumpBox<'a, [T]>

Allocate a slice and fill it by Copying elements from an existing slice. Read more
Source§

fn try_alloc_slice_copy<T: Copy>( &self, slice: &[T], ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocate a slice and fill it by Copying elements from an existing slice. Read more
Source§

fn alloc_slice_clone<T: Clone>(&self, slice: &[T]) -> BumpBox<'a, [T]>

Allocate a slice and fill it by Cloneing elements from an existing slice. Read more
Source§

fn try_alloc_slice_clone<T: Clone>( &self, slice: &[T], ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocate a slice and fill it by Cloneing elements from an existing slice. Read more
Source§

fn alloc_slice_fill<T: Clone>(&self, len: usize, value: T) -> BumpBox<'a, [T]>

Allocate a slice and fill it with elements by cloning value. Read more
Source§

fn try_alloc_slice_fill<T: Clone>( &self, len: usize, value: T, ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocate a slice and fill it with elements by cloning value. Read more
Source§

fn alloc_slice_fill_with<T>( &self, len: usize, f: impl FnMut() -> T, ) -> BumpBox<'a, [T]>

Allocates a slice by fill it with elements returned by calling a closure repeatedly. Read more
Source§

fn try_alloc_slice_fill_with<T>( &self, len: usize, f: impl FnMut() -> T, ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocates a slice by fill it with elements returned by calling a closure repeatedly. Read more
Source§

fn alloc_uninit_slice<T>(&self, len: usize) -> BumpBox<'a, [MaybeUninit<T>]>

Allocate an uninitialized object slice. Read more
Source§

fn try_alloc_uninit_slice<T>( &self, len: usize, ) -> Result<BumpBox<'a, [MaybeUninit<T>]>, AllocError>

Allocate an uninitialized object slice. Read more
Source§

fn alloc_uninit_slice_for<T>( &self, slice: &[T], ) -> BumpBox<'a, [MaybeUninit<T>]>

Allocate an uninitialized object slice. Read more
Source§

fn try_alloc_uninit_slice_for<T>( &self, slice: &[T], ) -> Result<BumpBox<'a, [MaybeUninit<T>]>, AllocError>

Allocate an uninitialized object slice. Read more
Source§

fn alloc_str(&self, src: &str) -> BumpBox<'a, str>

Allocate a str. Read more
Source§

fn try_alloc_str(&self, src: &str) -> Result<BumpBox<'a, str>, AllocError>

Allocate a str. Read more
Source§

fn alloc_fmt(&self, args: Arguments<'_>) -> BumpBox<'a, str>

Allocate a str from format arguments. Read more
Source§

fn try_alloc_fmt( &self, args: Arguments<'_>, ) -> Result<BumpBox<'a, str>, AllocError>

Allocate a str from format arguments. Read more
Source§

fn alloc_cstr(&self, src: &CStr) -> &'a CStr

Allocate a CStr. Read more
Source§

fn try_alloc_cstr(&self, src: &CStr) -> Result<&'a CStr, AllocError>

Allocate a CStr. Read more
Source§

fn alloc_cstr_from_str(&self, src: &str) -> &'a CStr

Allocate a CStr from a str. Read more
Source§

fn try_alloc_cstr_from_str(&self, src: &str) -> Result<&'a CStr, AllocError>

Allocate a CStr from a str. Read more
Source§

fn alloc_cstr_fmt(&self, args: Arguments<'_>) -> &'a CStr

Allocate a CStr from format arguments. Read more
Source§

fn try_alloc_cstr_fmt( &self, args: Arguments<'_>, ) -> Result<&'a CStr, AllocError>

Allocate a CStr from format arguments. Read more
Source§

fn alloc_iter<T>(&self, iter: impl IntoIterator<Item = T>) -> BumpBox<'a, [T]>

Allocate elements of an iterator into a slice. Read more
Source§

fn try_alloc_iter<T>( &self, iter: impl IntoIterator<Item = T>, ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocate elements of an iterator into a slice. Read more
Source§

fn alloc_iter_exact<T, I>( &self, iter: impl IntoIterator<Item = T, IntoIter = I>, ) -> BumpBox<'a, [T]>
where I: ExactSizeIterator<Item = T>,

Allocate elements of an ExactSizeIterator into a slice. Read more
Source§

fn try_alloc_iter_exact<T, I>( &self, iter: impl IntoIterator<Item = T, IntoIter = I>, ) -> Result<BumpBox<'a, [T]>, AllocError>
where I: ExactSizeIterator<Item = T>,

Allocate elements of an ExactSizeIterator into a slice. Read more
Source§

impl<'a, T> BumpAllocatorTypedScopeExt<'a> for T

Source§

fn alloc_zeroed<T>(&self) -> BumpBox<'a, T>
where T: Zeroable,

Allocate a zeroed object. Read more
Source§

fn try_alloc_zeroed<T>(&self) -> Result<BumpBox<'a, T>, AllocError>
where T: Zeroable,

Allocate a zeroed object. Read more
Source§

fn alloc_zeroed_slice<T>(&self, len: usize) -> BumpBox<'a, [T]>
where T: Zeroable,

Allocate a zeroed object slice. Read more
Source§

fn try_alloc_zeroed_slice<T>( &self, len: usize, ) -> Result<BumpBox<'a, [T]>, AllocError>
where T: Zeroable,

Allocate a zeroed object slice. Read more
Source§

impl<'a, T> BumpAllocatorTypedScopeExt<'a> for T

Source§

fn alloc_zeroed<T>(&self) -> BumpBox<'a, T>
where T: FromZeros,

Allocate a zeroed object. Read more
Source§

fn try_alloc_zeroed<T>(&self) -> Result<BumpBox<'a, T>, AllocError>
where T: FromZeros,

Allocate a zeroed object. Read more
Source§

fn alloc_zeroed_slice<T>(&self, len: usize) -> BumpBox<'a, [T]>
where T: FromZeros,

Allocate a zeroed object slice. Read more
Source§

fn try_alloc_zeroed_slice<T>( &self, len: usize, ) -> Result<BumpBox<'a, [T]>, AllocError>
where T: FromZeros,

Allocate a zeroed object slice. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, A> MutBumpAllocatorTypedScope<'a> for A

Source§

fn alloc_iter_mut<T>( &mut self, iter: impl IntoIterator<Item = T>, ) -> BumpBox<'a, [T]>

Allocate elements of an iterator into a slice. Read more
Source§

fn try_alloc_iter_mut<T>( &mut self, iter: impl IntoIterator<Item = T>, ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocate elements of an iterator into a slice. Read more
Source§

fn alloc_iter_mut_rev<T>( &mut self, iter: impl IntoIterator<Item = T>, ) -> BumpBox<'a, [T]>

Allocate elements of an iterator into a slice in reverse order. Read more
Source§

fn try_alloc_iter_mut_rev<T>( &mut self, iter: impl IntoIterator<Item = T>, ) -> Result<BumpBox<'a, [T]>, AllocError>

Allocate elements of an iterator into a slice in reverse order. Read more
Source§

fn alloc_fmt_mut(&mut self, args: Arguments<'_>) -> BumpBox<'a, str>

Allocate a str from format arguments. Read more
Source§

fn try_alloc_fmt_mut( &mut self, args: Arguments<'_>, ) -> Result<BumpBox<'a, str>, AllocError>

Allocate a str from format arguments. Read more
Source§

fn alloc_cstr_fmt_mut(&mut self, args: Arguments<'_>) -> &'a CStr

Allocate a CStr from format arguments. Read more
Source§

fn try_alloc_cstr_fmt_mut( &mut self, args: Arguments<'_>, ) -> Result<&'a CStr, AllocError>

Allocate a CStr from format arguments. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'a, B> MutBumpAllocatorCoreScope<'a> for B

Source§

impl<A> MutBumpAllocatorTyped for A

Source§

impl<T> NoDrop for T
where T: Copy,