pub struct VecHeader<I: Index = usize> {
pub capacity: I,
pub length: I,
}
Expand description
The header associated with each Vec
instance.
Fields§
§capacity: I
The capacity of the buffer.
length: I
The number of items stored in the buffer.
Trait Implementations§
Source§impl<T, I: Index> BufferHeader<T> for VecHeader<I>
impl<T, I: Index> BufferHeader<T> for VecHeader<I>
Source§impl<I: Ord + Index> Ord for VecHeader<I>
impl<I: Ord + Index> Ord for VecHeader<I>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<I: PartialOrd + Index> PartialOrd for VecHeader<I>
impl<I: PartialOrd + Index> PartialOrd for VecHeader<I>
impl<I: Copy + Index> Copy for VecHeader<I>
impl<I: Eq + Index> Eq for VecHeader<I>
impl<I: Index> StructuralPartialEq for VecHeader<I>
Auto Trait Implementations§
impl<I> Freeze for VecHeader<I>where
I: Freeze,
impl<I> RefUnwindSafe for VecHeader<I>where
I: RefUnwindSafe,
impl<I> Send for VecHeader<I>
impl<I> Sync for VecHeader<I>
impl<I> Unpin for VecHeader<I>where
I: Unpin,
impl<I> UnwindSafe for VecHeader<I>where
I: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.