Skip to main content

VecStorage

Struct VecStorage 

Source
pub struct VecStorage<V>(/* private fields */);
Expand description

Vec-backed storage (default).

Implementations§

Source§

impl<V> VecStorage<V>

Source

pub fn into_inner(self) -> Vec<V>

Trait Implementations§

Source§

impl<V: Clone> Clone for VecStorage<V>

Source§

fn clone(&self) -> VecStorage<V>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<V> Debug for VecStorage<V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<V> From<Vec<V>> for VecStorage<V>

Source§

fn from(v: Vec<V>) -> Self

Converts to this type from the input type.
Source§

impl<V> SliceStorage<V> for VecStorage<V>
where V: Clone + Default + Send + Sync,

Source§

fn total_len(&self) -> usize

Total number of elements stored.
Source§

fn resize(&mut self, new_len: usize) -> Result<(), MeshSieveError>

Resize total elements; preserve prefix [0..min(old,new)].
Source§

fn read_slice( &self, offset: usize, len: usize, ) -> Result<Vec<V>, MeshSieveError>

Read [offset .. offset+len] into a host Vec.
Source§

fn write_slice( &mut self, offset: usize, src: &[V], ) -> Result<(), MeshSieveError>

Write src into [offset .. offset+src.len()].
Source§

fn apply_delta<D: SliceDelta<V> + 'static>( &mut self, src_off: usize, dst_off: usize, len: usize, delta: &D, ) -> Result<(), MeshSieveError>

Apply a delta from a source slice to a destination slice (may overlap).
Source§

impl<V> Storage<V> for VecStorage<V>

Source§

fn with_len(len: usize, fill: V) -> Self
where V: Clone,

Construct a buffer of len, filled with fill.
Source§

fn len(&self) -> usize

Current length in elements.
Source§

fn resize(&mut self, new_len: usize, fill: V)
where V: Clone,

Resize to new_len, filling new cells with fill.
Source§

fn as_slice(&self) -> &[V]

Entire read-only buffer.
Source§

fn as_mut_slice(&mut self) -> &mut [V]

Entire mutable buffer.
Source§

fn write_at(&mut self, offset: usize, src: &[V]) -> Result<(), MeshSieveError>
where V: Clone,

Copy src into the range [offset .. offset + src.len()).
Source§

fn read_into( &self, offset: usize, len: usize, dst: &mut [V], ) -> Result<(), MeshSieveError>
where V: Clone,

Read the range [offset .. offset + len) into dst.

Auto Trait Implementations§

§

impl<V> Freeze for VecStorage<V>

§

impl<V> RefUnwindSafe for VecStorage<V>
where V: RefUnwindSafe,

§

impl<V> Send for VecStorage<V>
where V: Send,

§

impl<V> Sync for VecStorage<V>
where V: Sync,

§

impl<V> Unpin for VecStorage<V>
where V: Unpin,

§

impl<V> UnsafeUnpin for VecStorage<V>

§

impl<V> UnwindSafe for VecStorage<V>
where V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> AccumulatePathExt for T

Source§

fn accumulate_path<O, I>(path: I) -> O
where O: Orientation, I: IntoIterator<Item = O>,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> PayloadLike for T
where T: Clone,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.