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 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:
srcmust be valid for reads.srcmust be properly aligned.srcmust point to a properly initialized value of typeT.srcmust 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:
srcmust be valid for reads.srcmust be properly aligned.srcmust point to a properly initialized value of typeT.srcmust not be used or dropped anymore (use std::mem::forget)