pub struct PinnedVec<T: Default + Clone + Sized> { /* private fields */ }
Implementations§
source§impl<T: Clone + Default + Sized> PinnedVec<T>
impl<T: Clone + Default + Sized> PinnedVec<T>
pub fn reserve(&mut self, size: usize)
pub fn reserve_and_pin(&mut self, size: usize)
pub fn set_pinnable(&mut self)
pub fn copy_from_slice(&mut self, data: &[T])where
T: Copy,
pub fn from_vec(source: Vec<T>) -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn as_ptr(&self) -> *const T
pub fn as_mut_ptr(&mut self) -> *mut T
pub fn push(&mut self, x: T)
pub fn truncate(&mut self, size: usize)
pub fn resize(&mut self, size: usize, elem: T)
pub fn append(&mut self, other: &mut Vec<T>)
pub fn append_pinned(&mut self, other: &mut Self)
sourcepub unsafe fn set_len(&mut self, size: usize)
pub unsafe fn set_len(&mut self, size: usize)
Forces the length of the vector to new_len
.
This is a low-level operation that maintains none of the normal
invariants of the type. Normally changing the length of a vector
is done using one of the safe operations instead, such as
truncate
, resize
, extend
, or clear
.
§Safety
new_len
must be less than or equal tocapacity()
.- The elements at
old_len..new_len
must be initialized.
pub fn shuffle<R: Rng>(&mut self, rng: &mut R)
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for PinnedVec<T>
impl<'de, T> Deserialize<'de> for PinnedVec<T>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, T: Clone + Send + Sync + Default + Sized> IntoParallelIterator for &'a mut PinnedVec<T>
impl<'a, T: Clone + Send + Sync + Default + Sized> IntoParallelIterator for &'a mut PinnedVec<T>
Auto Trait Implementations§
impl<T> Freeze for PinnedVec<T>
impl<T> RefUnwindSafe for PinnedVec<T>where
T: RefUnwindSafe,
impl<T> Send for PinnedVec<T>where
T: Send,
impl<T> Sync for PinnedVec<T>
impl<T> Unpin for PinnedVec<T>where
T: Unpin,
impl<T> UnwindSafe for PinnedVec<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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<Ctx, I, R> Cread<Ctx, I> for R
impl<Ctx, I, R> Cread<Ctx, I> for R
source§fn cread_with<N>(&self, offset: I, ctx: Ctx) -> N
fn cread_with<N>(&self, offset: I, ctx: Ctx) -> N
Reads a value from
Self
at offset
with ctx
. Cannot fail.
If the buffer is too small for the value requested, this will panic. Read moresource§impl<Ctx, I, W> Cwrite<Ctx, I> for W
impl<Ctx, I, W> Cwrite<Ctx, I> for W
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<'data, I> IntoParallelRefIterator<'data> for I
impl<'data, I> IntoParallelRefIterator<'data> for I
source§impl<'data, I> IntoParallelRefMutIterator<'data> for I
impl<'data, I> IntoParallelRefMutIterator<'data> for I
source§type Iter = <&'data mut I as IntoParallelIterator>::Iter
type Iter = <&'data mut I as IntoParallelIterator>::Iter
The type of iterator that will be created.
source§type Item = <&'data mut I as IntoParallelIterator>::Item
type Item = <&'data mut I as IntoParallelIterator>::Item
The type of item that will be produced; this is typically an
&'data mut T
reference.source§fn par_iter_mut(
&'data mut self,
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
fn par_iter_mut( &'data mut self, ) -> <I as IntoParallelRefMutIterator<'data>>::Iter
Creates the parallel iterator from
self
. Read more