[−]Struct recrypt::nonemptyvec::NonEmptyVec
A simple-minded NonEmptyVec implementation
Methods
impl<T> NonEmptyVec<T> where
T: Clone,
T: Clone,
pub fn new_first(first: T) -> Self
pub fn new(first: T, rest: Vec<T>) -> Self
pub fn new_last(first_v: &[T], tail: NonEmptyVec<T>) -> Self
pub fn first(&self) -> &T
pub fn rest(&self) -> &Vec<T>
pub fn to_vec(&self) -> Vec<T>
pub fn try_from(v: &[T]) -> Result<NonEmptyVec<T>, NonEmptyVecError>
pub fn concat(&self, b: &NonEmptyVec<T>) -> NonEmptyVec<T>
pub fn last(&self) -> &T
pub fn len(&self) -> usize
pub fn as_vec(self) -> Vec<T>
Trait Implementations
impl<T: Hashable + Clone> Hashable for NonEmptyVec<T>
impl<T> Into<Vec<T>> for NonEmptyVec<T>
impl<T: Clone> Clone for NonEmptyVec<T>
fn clone(&self) -> NonEmptyVec<T>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Eq> Eq for NonEmptyVec<T>
impl<T: PartialEq> PartialEq<NonEmptyVec<T>> for NonEmptyVec<T>
fn eq(&self, other: &NonEmptyVec<T>) -> bool
fn ne(&self, other: &NonEmptyVec<T>) -> bool
impl<T: Debug> Debug for NonEmptyVec<T>
impl<T> StructuralPartialEq for NonEmptyVec<T>
impl<T> StructuralEq for NonEmptyVec<T>
Auto Trait Implementations
impl<T> Send for NonEmptyVec<T> where
T: Send,
T: Send,
impl<T> Sync for NonEmptyVec<T> where
T: Sync,
T: Sync,
impl<T> Unpin for NonEmptyVec<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for NonEmptyVec<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for NonEmptyVec<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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 = !
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,
impl<T> Same<T> for T
type Output = T
Should always be Self