pub type DynVec<T> = dyn Vector<T>;Implementations§
Methods from Deref<Target = LeanVec<T::Type>>§
pub fn len(&self) -> usize
pub fn spare_capacity(&self) -> usize
pub fn has_spare_capacity(&self) -> bool
Sourcepub unsafe fn set_len(&mut self, new_len: usize)
pub unsafe fn set_len(&mut self, new_len: usize)
Sets the current vector’s length to new_len
§Safety
new_lenmust be less than or equal to [self.capacity()].- The elements at
old_len..new_lenmust be initialized.
[self.capacity()]: RawVec ::capacity
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn as_ptr(&self) -> *const T
pub fn as_slice(&self) -> &[T]
pub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_slice(&mut self) -> &mut [T]
pub fn reserve(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
pub fn clear(&mut self)
pub fn truncate(&mut self, len: usize)
pub fn push(&mut self, value: T)
Sourcepub unsafe fn push_unchecked(&mut self, value: T)
pub unsafe fn push_unchecked(&mut self, value: T)
Push value to self without checking for spare capacity or allocating
new capacity.
§Safety
Requires that self.capacity() > self.len().
pub fn extend_from_slice(&mut self, other: &[T])where
T: Clone,
pub fn append_from_slice(&mut self, other: &mut [T])where
T: Default,
pub fn append(&mut self, other: &mut Self)
pub fn dedup(&mut self)where
T: Eq,
pub fn dedup_by<F>(&mut self, same_bucket: F)
pub fn dedup_by_starting_at<F>(&mut self, start: usize, same_bucket: F)
pub fn retain<F>(&mut self, f: F)
pub fn retain_starting_at<F>(&mut self, start: usize, f: F)
pub fn is_sorted_by<F>(&self, compare: F) -> bool
pub fn raw_iter(&self) -> RawIter<'_> ⓘ
Trait Implementations§
Source§impl<T> Archive for Box<DynVec<T>>
impl<T> Archive for Box<DynVec<T>>
Source§impl<T> ArchiveTrait for DynVec<T>
impl<T> ArchiveTrait for DynVec<T>
type Archived = dyn DeserializeDyn<dyn Vector<T>>
Source§impl<T> DowncastTrait for DynVec<T>
impl<T> DowncastTrait for DynVec<T>
Source§fn downcast_checked<T: AsAny>(&self) -> &T
fn downcast_checked<T: AsAny>(&self) -> &T
Cast trait object reference to a reference to a concrete type
T. Read moreSource§fn downcast_mut_checked<T: AsAny>(&mut self) -> &mut T
fn downcast_mut_checked<T: AsAny>(&mut self) -> &mut T
Cast trait object reference to a mutable reference to a concrete type
T. Read moreSource§impl<T> PartialOrd for DynVec<T>
impl<T> PartialOrd for DynVec<T>
Source§fn serialize(
&self,
_serializer: &mut Serializer,
) -> Result<Self::Resolver, <Serializer as Fallible>::Error>
fn serialize( &self, _serializer: &mut Serializer, ) -> Result<Self::Resolver, <Serializer as Fallible>::Error>
Writes the dependencies for the object and returns a resolver that can create the archived
type.