pub struct DynSequence<T: ?Sized> { /* private fields */ }

Implementations§

§

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

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 type T.
  • src must not be used or dropped anymore (use std::mem::forget)

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 type T.
  • 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>

§

fn default() -> Self

Returns the “default value” for a type. Read more
§

impl<T: ?Sized> Drop for DynSequence<T>

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl<T: ?Sized> Index<usize> for DynSequence<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
§

impl<T: ?Sized> IndexMut<usize> for DynSequence<T>

§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
§

impl<'l, T: ?Sized> IntoIterator for &'l DynSequence<T>

§

type Item = &'l T

The type of the elements being iterated over.
§

type IntoIter = Copied<Iter<'l, &'l T>>

Which kind of iterator are we turning this into?
§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
§

impl<'l, T: ?Sized> IntoIterator for &'l mut DynSequence<T>

§

type Item = &'l mut T

The type of the elements being iterated over.
§

type IntoIter = DynSeqIterMut<'l, T>

Which kind of iterator are we turning this into?
§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.