[][src]Struct voile_util::vec1::Vec1

pub struct Vec1<T> {
    head: T,
    tail: Vec<T>,
}

Non-empty vector.

Fields

head: Ttail: Vec<T>

Methods

impl<T> Vec1<T>[src]

pub fn new(head: T, tail: Vec<T>) -> Self[src]

pub fn push(&mut self, new: 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 try_map<E, R>(
    self,
    f: impl FnMut(T) -> Result<R, E>
) -> Result<Vec1<R>, E>
[src]

pub fn try_fold1<E>(self, f: impl FnMut(T, T) -> Result<T, E>) -> Result<T, E>[src]

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: Eq> Eq for Vec1<T>[src]

impl<T: Default> Default for Vec1<T>[src]

impl<T: Clone> Clone for Vec1<T>[src]

impl<T: PartialOrd> PartialOrd<Vec1<T>> for Vec1<T>[src]

impl<T: Ord> Ord for Vec1<T>[src]

impl<T: PartialEq> PartialEq<Vec1<T>> for Vec1<T>[src]

impl<T> From<T> for Vec1<T>[src]

impl<T: Debug> Debug for Vec1<T>[src]

Auto Trait Implementations

impl<T> Sync for Vec1<T> where
    T: Sync

impl<T> Send for Vec1<T> where
    T: Send

impl<T> Unpin for Vec1<T> where
    T: Unpin

impl<T> UnwindSafe for Vec1<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Vec1<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]