pub struct Thin<A: Allocator = Global, 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 Thin<A, I, G>
impl<A: AllocatorDefault, I: Index, G: Grow> ConstDefault for Thin<A, I, G>
Source§impl<A: Default + Allocator, I: Default + Index, G: Default + Grow> Default for Thin<A, I, G>
impl<A: Default + Allocator, I: Default + Index, G: Default + Grow> Default for Thin<A, I, G>
Source§impl<A: PartialEq + Allocator, I: PartialEq + Index, G: PartialEq + Grow> PartialEq for Thin<A, I, G>
impl<A: PartialEq + Allocator, I: PartialEq + Index, G: PartialEq + Grow> PartialEq for Thin<A, I, G>
Source§impl<T, A: Allocator, I: Index, G: Grow> VecConfigAlloc<T> for Thin<A, I, G>
impl<T, A: Allocator, I: Index, G: Grow> VecConfigAlloc<T> for Thin<A, I, G>
Source§impl<T, A: AllocatorDefault, I: Index, G: Grow> VecConfigNew<T> for Thin<A, I, G>
impl<T, A: AllocatorDefault, I: Index, G: Grow> VecConfigNew<T> for Thin<A, I, G>
Source§const EMPTY_BUFFER: Self::Buffer<T> = ThinBuffer<T, VecHeader<usize>, A>::DEFAULT
const EMPTY_BUFFER: Self::Buffer<T> = ThinBuffer<T, VecHeader<usize>, A>::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 Thin<A, I, G>
impl<T, A: Allocator + Clone, I: Index, G: Grow> VecConfigSpawn<T> for Thin<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.
impl<A: Eq + Allocator, I: Eq + Index, G: Eq + Grow> Eq for Thin<A, I, G>
impl<A: Allocator, I: Index, G: Grow> StructuralPartialEq for Thin<A, I, G>
Auto Trait Implementations§
impl<A, I, G> Freeze for Thin<A, I, G>where
A: Freeze,
impl<A, I, G> RefUnwindSafe for Thin<A, I, G>
impl<A, I, G> Send for Thin<A, I, G>
impl<A, I, G> Sync for Thin<A, I, G>
impl<A, I, G> Unpin for Thin<A, I, G>
impl<A, I, G> UnwindSafe for Thin<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, A> ToOwnedIn<A> for T
impl<T, A> ToOwnedIn<A> for T
Source§fn try_to_owned_in<I>(
&self,
_alloc_in: I,
) -> Result<<T as ToOwnedIn<A>>::Owned, StorageError>where
I: AllocateIn<Alloc = A>,
fn try_to_owned_in<I>(
&self,
_alloc_in: I,
) -> Result<<T as ToOwnedIn<A>>::Owned, StorageError>where
I: AllocateIn<Alloc = A>,
To to create an owned copy of this instance in a given allocation target.
Source§fn to_owned_in<I>(&self, alloc_in: I) -> Self::Ownedwhere
I: AllocateIn<Alloc = A>,
fn to_owned_in<I>(&self, alloc_in: I) -> Self::Ownedwhere
I: AllocateIn<Alloc = A>,
Create an owned copy of this instance in a given allocation target.