[−][src]Struct voile_util::vec1::Vec1
Non-empty vector.
Fields
head: T
tail: Vec<T>
Methods
impl<T> Vec1<T>
[src]
pub fn new(head: T, tail: Vec<T>) -> Self
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn is_single(&self) -> bool
[src]
pub fn into_vec(self) -> Vec<T>
[src]
pub fn push(&mut self, new: T)
[src]
pub fn append_self_into(self, target: &mut Vec<T>)
[src]
pub fn append(&mut self, new: Vec1<T>)
[src]
pub fn append_vec(&mut self, new: &mut Vec<T>)
[src]
pub fn head(&self) -> &T
[src]
pub fn head_mut(&mut self) -> &mut T
[src]
pub fn tail(&self) -> &Vec<T>
[src]
pub fn tail_mut(&mut self) -> &mut Vec<T>
[src]
pub fn last(&self) -> &T
[src]
pub fn last_mut(&mut self) -> &mut T
[src]
pub fn insert(&mut self, index: usize, new: T)
[src]
pub fn map<R>(self, f: impl FnMut(T) -> R) -> Vec1<R>
[src]
pub fn scan<St, B>(
self,
init: St,
f: impl FnMut(St, T) -> (B, St)
) -> (St, Vec1<B>)
[src]
self,
init: St,
f: impl FnMut(St, T) -> (B, St)
) -> (St, Vec1<B>)
pub fn try_scan<St, B, E>(
self,
init: St,
f: impl FnMut(St, T) -> Result<(B, St), E>
) -> Result<(St, Vec1<B>), E>
[src]
self,
init: St,
f: impl FnMut(St, T) -> Result<(B, St), E>
) -> Result<(St, Vec1<B>), E>
pub fn try_map<E, R>(
self,
f: impl FnMut(T) -> Result<R, E>
) -> Result<Vec1<R>, E>
[src]
self,
f: impl FnMut(T) -> Result<R, E>
) -> Result<Vec1<R>, E>
pub fn try_fold1<E>(self, f: impl FnMut(T, T) -> Result<T, E>) -> Result<T, E>
[src]
pub fn try_fold<R, E>(
self,
init: R,
f: impl FnMut(R, T) -> Result<R, E>
) -> Result<R, E>
[src]
self,
init: R,
f: impl FnMut(R, T) -> Result<R, E>
) -> Result<R, E>
pub fn fold1(self, f: impl FnMut(T, T) -> T) -> T
[src]
pub fn fold<R>(self, init: R, f: impl FnMut(R, T) -> R) -> R
[src]
pub fn rev_fold1(self, f: impl FnMut(T, T) -> T) -> T
[src]
pub fn rev_fold<R>(self, init: R, f: impl FnMut(R, T) -> R) -> R
[src]
Trait Implementations
impl<T> Into<Vec<T>> for Vec1<T>
[src]
impl<T> From<T> for Vec1<T>
[src]
impl<T: Clone> Clone for Vec1<T>
[src]
impl<T: Default> Default for Vec1<T>
[src]
impl<T: Eq> Eq for Vec1<T>
[src]
fn assert_receiver_is_total_eq(&self)
[src]
impl<T: Ord> Ord for Vec1<T>
[src]
fn cmp(&self, other: &Vec1<T>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<Vec1<T>> for Vec1<T>
[src]
impl<T: PartialOrd> PartialOrd<Vec1<T>> for Vec1<T>
[src]
fn partial_cmp(&self, other: &Vec1<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Vec1<T>) -> bool
[src]
fn le(&self, other: &Vec1<T>) -> bool
[src]
fn gt(&self, other: &Vec1<T>) -> bool
[src]
fn ge(&self, other: &Vec1<T>) -> bool
[src]
impl<T: Debug> Debug for Vec1<T>
[src]
impl<T> TryFrom<Vec<T>> for Vec1<T>
[src]
type Error = ()
The type returned in the event of a conversion error.
fn try_from(value: Vec<T>) -> Result<Self, Self::Error>
[src]
impl<T> StructuralPartialEq for Vec1<T>
[src]
impl<T> StructuralEq for Vec1<T>
[src]
Auto Trait Implementations
impl<T> Send for Vec1<T> where
T: Send,
T: Send,
impl<T> Sync for Vec1<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Vec1<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Vec1<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for Vec1<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> From<!> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,