Struct dynsequence::DynSequence
pub struct DynSequence<T: ?Sized> { /* private fields */ }
Implementations§
§impl<T: ?Sized> DynSequence<T>
impl<T: ?Sized> DynSequence<T>
pub const fn new() -> Self
pub const fn with_blocksize(block_size: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub unsafe fn insert_raw(&mut self, index: usize, src: *const T) -> &mut T
pub unsafe fn insert_raw(&mut self, index: usize, src: *const T) -> &mut T
Inserts a new value into the DynSequence at the given index (see Vec::insert) by moving the value behind the pointer and taking ownership.
Safety
Behavior is undefined if any of the following conditions are violated:
src
must be valid for reads.src
must be properly aligned.src
must point to a properly initialized value of typeT
.src
must not be used or dropped anymore (use std::mem::forget)
pub unsafe fn push_raw(&mut self, src: *const T) -> &mut T
pub unsafe fn push_raw(&mut self, src: *const T) -> &mut T
Adds a new value at the end of the DynSequence (see Vec::push) by moving the value behind the pointer and taking ownership.
Safety
Behavior is undefined if any of the following conditions are violated:
src
must be valid for reads.src
must be properly aligned.src
must point to a properly initialized value of typeT
.src
must not be used or dropped anymore (use std::mem::forget)
pub fn get(&self, index: usize) -> Option<&T>
pub fn get_mut(&mut self, index: usize) -> Option<&mut T>
pub fn as_slice(&self) -> &[&T]
pub fn as_mut_slice(&mut self) -> &mut [&mut T]
pub fn as_mut_const_slice(&mut self) -> &mut [&T]
pub fn iter(&self) -> DynSeqIter<'_, T>
pub fn iter_mut(&mut self) -> DynSeqIterMut<'_, T> ⓘ
pub fn extend_dynsequence(&mut self, other: Self)
Trait Implementations§
§impl<T: ?Sized> Default for DynSequence<T>
impl<T: ?Sized> Default for DynSequence<T>
§impl<T: ?Sized> Drop for DynSequence<T>
impl<T: ?Sized> Drop for DynSequence<T>
§impl<T: ?Sized> Index<usize> for DynSequence<T>
impl<T: ?Sized> Index<usize> for DynSequence<T>
§impl<T: ?Sized> IndexMut<usize> for DynSequence<T>
impl<T: ?Sized> IndexMut<usize> for DynSequence<T>
§impl<'l, T: ?Sized> IntoIterator for &'l DynSequence<T>
impl<'l, T: ?Sized> IntoIterator for &'l DynSequence<T>
§impl<'l, T: ?Sized> IntoIterator for &'l mut DynSequence<T>
impl<'l, T: ?Sized> IntoIterator for &'l mut DynSequence<T>
impl<T> Send for DynSequence<T>where T: Send + ?Sized,
impl<T> Sync for DynSequence<T>where T: Sync + ?Sized,
Auto Trait Implementations§
impl<T: ?Sized> RefUnwindSafe for DynSequence<T>where T: RefUnwindSafe,
impl<T: ?Sized> Unpin for DynSequence<T>
impl<T: ?Sized> UnwindSafe for DynSequence<T>where T: RefUnwindSafe,
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