pub struct BumpSettings<const MIN_ALIGN: usize = 1, const UP: bool = true, const GUARANTEED_ALLOCATED: bool = true, const CLAIMABLE: bool = true, const DEALLOCATES: bool = true, const SHRINKS: bool = true, const MINIMUM_CHUNK_SIZE: usize = 512>;Expand description
Implementor of BumpAllocatorSettings.
See the module documentation for how to use this type.
Trait Implementations§
Source§impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> BumpAllocatorSettings for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>where
MinimumAlignment<MIN_ALIGN>: SupportedMinimumAlignment,
impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> BumpAllocatorSettings for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>where
MinimumAlignment<MIN_ALIGN>: SupportedMinimumAlignment,
Source§const MINIMUM_CHUNK_SIZE: usize = MINIMUM_CHUNK_SIZE
const MINIMUM_CHUNK_SIZE: usize = MINIMUM_CHUNK_SIZE
The minimum size for bump allocation chunk.
Source§type MinimumAlignment = MinimumAlignment<MIN_ALIGN>
type MinimumAlignment = MinimumAlignment<MIN_ALIGN>
The minimum alignment.
Source§type GuaranteedAllocated = Bool<GUARANTEED_ALLOCATED>
type GuaranteedAllocated = Bool<GUARANTEED_ALLOCATED>
Whether the allocator is guaranteed to have a chunk allocated and thus is allowed to create scopes.
Source§type Deallocates = Bool<DEALLOCATES>
type Deallocates = Bool<DEALLOCATES>
Whether the allocator tries to free allocations.
Source§type WithMinimumAlignment<const VALUE: usize> = BumpSettings<VALUE, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
where
MinimumAlignment<VALUE>: SupportedMinimumAlignment
type WithMinimumAlignment<const VALUE: usize> = BumpSettings<VALUE, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE> where MinimumAlignment<VALUE>: SupportedMinimumAlignment
Changes the minimum alignment.
Source§type WithUp<const VALUE: bool> = BumpSettings<MIN_ALIGN, VALUE, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
type WithUp<const VALUE: bool> = BumpSettings<MIN_ALIGN, VALUE, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
Changes the bump direction.
Source§type WithGuaranteedAllocated<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, VALUE, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
type WithGuaranteedAllocated<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, VALUE, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
Changes whether the allocator is guaranteed to have a chunk allocated and thus is allowed to create scopes.
Source§type WithClaimable<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, VALUE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
type WithClaimable<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, VALUE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
Changes whether the allocator can be claimed.
Source§type WithDeallocates<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, VALUE, SHRINKS, MINIMUM_CHUNK_SIZE>
type WithDeallocates<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, VALUE, SHRINKS, MINIMUM_CHUNK_SIZE>
Changes whether the allocator tries to free allocations.
Source§type WithShrinks<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, VALUE, MINIMUM_CHUNK_SIZE>
type WithShrinks<const VALUE: bool> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, VALUE, MINIMUM_CHUNK_SIZE>
Changes whether the allocator tries to shrink allocations.
Source§type WithMinimumChunkSize<const VALUE: usize> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, VALUE>
type WithMinimumChunkSize<const VALUE: usize> = BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, VALUE>
Changes the minimum chunk size.
Source§const GUARANTEED_ALLOCATED: bool = <Self::GuaranteedAllocated>::VALUE
const GUARANTEED_ALLOCATED: bool = <Self::GuaranteedAllocated>::VALUE
Whether the allocator is guaranteed to have a chunk allocated and thus is allowed to create scopes.
Source§const DEALLOCATES: bool = <Self::Deallocates>::VALUE
const DEALLOCATES: bool = <Self::Deallocates>::VALUE
Whether the allocator tries to free allocations.
Auto Trait Implementations§
impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> Freeze for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> RefUnwindSafe for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> Send for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> Sync for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> Unpin for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
impl<const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool, const CLAIMABLE: bool, const DEALLOCATES: bool, const SHRINKS: bool, const MINIMUM_CHUNK_SIZE: usize> UnwindSafe for BumpSettings<MIN_ALIGN, UP, GUARANTEED_ALLOCATED, CLAIMABLE, DEALLOCATES, SHRINKS, MINIMUM_CHUNK_SIZE>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more