Struct VecDeep

Source
pub struct VecDeep<T>(pub Vec<T>);
Expand description

A wrapper for Vec with its View implemented one layer deeper than the original Vec

Otherwise inherits all methods from Vec

Tuple Fields§

§0: Vec<T>

Implementations§

Source§

impl<T: View> VecDeep<T>

Source

pub fn new() -> Self

Source

pub fn with_capacity(cap: usize) -> Self

Source

pub fn push(&mut self, value: T)

Source

pub fn len(&self) -> usize

Source

pub fn get(&self, i: usize) -> &T

Source

pub fn remove(&mut self, i: usize) -> T

Source

pub fn append(&mut self, other: &mut VecDeep<T>)

Source

pub fn append_owned(&mut self, other: VecDeep<T>)

Source

pub fn split_off(&mut self, at: usize) -> VecDeep<T>

Source

pub fn from_vec(v: Vec<T>) -> Self

Source

pub fn from_slice(slice: &[T]) -> Self
where T: Copy,

Source

pub fn to_vec_owned(self) -> Vec<T>

Source

pub fn to_vec(&self) -> &Vec<T>

Trait Implementations§

Source§

impl<T: Debug> Debug for VecDeep<T>

Source§

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

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

impl<T: PartialEq> PartialEq for VecDeep<T>

Source§

fn eq(&self, other: &VecDeep<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PolyfillClone> PolyfillClone for VecDeep<T>

Cloning VecDeep clones each element

Source§

fn clone(&self) -> Self

Same as clone of Vec, but this is a “deep” copy

Source§

impl<T: PolyfillEq> PolyfillEq for VecDeep<T>

Source§

fn polyfill_eq(&self, other: &Self) -> bool

Source§

impl<T: View> View for VecDeep<T>

Source§

type V = Seq<<T as View>::V>

Source§

impl<T: Eq> Eq for VecDeep<T>

Source§

impl<T> StructuralPartialEq for VecDeep<T>

Auto Trait Implementations§

§

impl<T> Freeze for VecDeep<T>

§

impl<T> RefUnwindSafe for VecDeep<T>
where T: RefUnwindSafe,

§

impl<T> Send for VecDeep<T>
where T: Send,

§

impl<T> Sync for VecDeep<T>
where T: Sync,

§

impl<T> Unpin for VecDeep<T>
where T: Unpin,

§

impl<T> UnwindSafe for VecDeep<T>
where T: UnwindSafe,

Blanket Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> From<T> for T
where T: View, <T as View>::V: SpecFrom<<T as View>::V>,

Source§

fn ex_from(t: T) -> T

Vest equivalent of std::convert::From::from.
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, U> Into<U> for T
where T: View, U: View + From<T>, <U as View>::V: SpecFrom<<T as View>::V>,

Source§

fn ex_into(self) -> U

Vest equivalent of std::convert::Into::into.
Source§

impl<T, U> SpecTryInto<U> for T
where U: SpecTryFrom<T>,

Source§

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

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T, U> TryInto<U> for T
where T: View, U: View + TryFrom<T>, <U as View>::V: SpecTryFrom<<T as View>::V>,

Source§

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

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

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

Source§

impl<T> SpecFrom<T> for T

Source§

impl<T, U> SpecInto<U> for T
where U: SpecFrom<T>,