Struct fixed_typed_arena::Options
source · pub struct Options<const CHUNK_SIZE: usize = 16, const SUPPORTS_POSITIONS: bool = false, const MUTABLE: bool = true>;
Expand description
Arena options.
Const parameters correspond to associated types in ArenaOptions
as
follows; see those associated types for documentation:
CHUNK_SIZE
:ArenaOptions::ChunkSize
SUPPORTS_POSITIONS
:ArenaOptions::SupportsPositions
MUTABLE
:ArenaOptions::Mutable
Trait Implementations
sourceimpl<T, const CHUNK_SIZE: usize, const SUPPORTS_POSITIONS: bool, const MUTABLE: bool> ArenaOptions<T> for Options<CHUNK_SIZE, SUPPORTS_POSITIONS, MUTABLE>where
Bool<SUPPORTS_POSITIONS>: SupportsPositions,
impl<T, const CHUNK_SIZE: usize, const SUPPORTS_POSITIONS: bool, const MUTABLE: bool> ArenaOptions<T> for Options<CHUNK_SIZE, SUPPORTS_POSITIONS, MUTABLE>where
Bool<SUPPORTS_POSITIONS>: SupportsPositions,
type ChunkSize = Usize<CHUNK_SIZE>
type ChunkSize = Usize<CHUNK_SIZE>
The number of elements of type
T
that each chunk can hold.type SupportsPositions = Bool<SUPPORTS_POSITIONS>
type SupportsPositions = Bool<SUPPORTS_POSITIONS>
If true, enables the use of
Position
s, allowing methods like
IterMut::as_position
and Arena::iter_mut_at
to be called, at
the cost of using slightly more memory. Read moretype Mutable = Bool<MUTABLE>
type Mutable = Bool<MUTABLE>
If true, the arena is able to return mutable references.
Auto Trait Implementations
impl<const CHUNK_SIZE: usize, const SUPPORTS_POSITIONS: bool, const MUTABLE: bool> RefUnwindSafe for Options<CHUNK_SIZE, SUPPORTS_POSITIONS, MUTABLE>
impl<const CHUNK_SIZE: usize, const SUPPORTS_POSITIONS: bool, const MUTABLE: bool> Send for Options<CHUNK_SIZE, SUPPORTS_POSITIONS, MUTABLE>
impl<const CHUNK_SIZE: usize, const SUPPORTS_POSITIONS: bool, const MUTABLE: bool> Sync for Options<CHUNK_SIZE, SUPPORTS_POSITIONS, MUTABLE>
impl<const CHUNK_SIZE: usize, const SUPPORTS_POSITIONS: bool, const MUTABLE: bool> Unpin for Options<CHUNK_SIZE, SUPPORTS_POSITIONS, MUTABLE>
impl<const CHUNK_SIZE: usize, const SUPPORTS_POSITIONS: bool, const MUTABLE: bool> UnwindSafe for Options<CHUNK_SIZE, SUPPORTS_POSITIONS, MUTABLE>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more