pub struct Custom<A: Allocator, I: Index = usize, G: Grow = GrowExact> { /* private fields */ }
Expand description
Parameterize Vec
with a custom index type or growth behavior.
Trait Implementations§
Source§impl<A: AllocatorDefault, I: Index, G: Grow> ConstDefault for Custom<A, I, G>
impl<A: AllocatorDefault, I: Index, G: Grow> ConstDefault for Custom<A, I, G>
Source§impl<A: Default + Allocator, I: Default + Index, G: Default + Grow> Default for Custom<A, I, G>
impl<A: Default + Allocator, I: Default + Index, G: Default + Grow> Default for Custom<A, I, G>
Source§impl<T, A: AllocatorDefault, I: Index, G: Grow> VecConfigNew<T> for Custom<A, I, G>
impl<T, A: AllocatorDefault, I: Index, G: Grow> VecConfigNew<T> for Custom<A, I, G>
Source§const EMPTY_BUFFER: Self::Buffer<T> = FatBuffer::DEFAULT
const EMPTY_BUFFER: Self::Buffer<T> = FatBuffer::DEFAULT
Constant initializer for an empty buffer.
Source§fn buffer_try_new(
capacity: Self::Index,
exact: bool,
) -> Result<Self::Buffer<T>, StorageError>
fn buffer_try_new( capacity: Self::Index, exact: bool, ) -> Result<Self::Buffer<T>, StorageError>
Try to create a new buffer instance with a given capacity.
Source§impl<T, A: Allocator + Clone, I: Index, G: Grow> VecConfigSpawn<T> for Custom<A, I, G>
impl<T, A: Allocator + Clone, I: Index, G: Grow> VecConfigSpawn<T> for Custom<A, I, G>
Source§fn buffer_try_spawn(
buf: &Self::Buffer<T>,
capacity: Self::Index,
exact: bool,
) -> Result<Self::Buffer<T>, StorageError>
fn buffer_try_spawn( buf: &Self::Buffer<T>, capacity: Self::Index, exact: bool, ) -> Result<Self::Buffer<T>, StorageError>
Try to create a new buffer instance with a given capacity.
Auto Trait Implementations§
impl<A, I, G> Freeze for Custom<A, I, G>where
A: Freeze,
impl<A, I, G> RefUnwindSafe for Custom<A, I, G>
impl<A, I, G> Send for Custom<A, I, G>
impl<A, I, G> Sync for Custom<A, I, G>
impl<A, I, G> Unpin for Custom<A, I, G>
impl<A, I, G> UnwindSafe for Custom<A, I, G>
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