Struct tlist::TCons

source ·
pub struct TCons<H, T: TList>(_);
Expand description

A non-empty TList whose first element is H and whose tail is the TList T.

Trait Implementations§

source§

impl<H: Clone, T: Clone + TList> Clone for TCons<H, T>

source§

fn clone(&self) -> TCons<H, T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<H: Debug, T: Debug + TList> Debug for TCons<H, T>

source§

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

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

impl<H: Default, T: Default + TList> Default for TCons<H, T>

source§

fn default() -> TCons<H, T>

Returns the “default value” for a type. Read more
source§

impl<H: Hash, T: Hash + TList> Hash for TCons<H, T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<H, T: TList> NonEmpty for TCons<H, T>

§

type First = H

Implementation of First.
§

type Rest = T

Implementation of Rest.
§

type Last = <T as TListImpl>::Last<H>

Implementation of Last.
§

type Inits = <T as TListImpl>::Inits<H>

Implementation of Inits.
source§

impl<H: Ord, T: Ord + TList> Ord for TCons<H, T>

source§

fn cmp(&self, other: &TCons<H, T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl<H: PartialEq, T: PartialEq + TList> PartialEq<TCons<H, T>> for TCons<H, T>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<H: PartialOrd, T: PartialOrd + TList> PartialOrd<TCons<H, T>> for TCons<H, T>

source§

fn partial_cmp(&self, other: &TCons<H, T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<H, T: TList> TList for TCons<H, T>

§

type Concat<Rhs: TList> = TCons<H, <T as TList>::Concat<Rhs>>

Implementation of Concat.
§

type Reverse = <<T as TList>::Reverse as TList>::Concat<TCons<H, TNil>>

Implementation of Reverse.
§

type IsEmpty = B0

Available on crate feature typenum only.
Implementation of IsEmpty.
§

type Len = <<T as TList>::Len as UnsignedExt>::Succ

Available on crate feature typenum only.
Implementation of Len.
source§

const IS_EMPTY: bool = false

True iff the list is empty, false otherwise. Read more
source§

const LEN: usize = _

The amount of elements in the list. Read more
source§

impl<F, FS, GS: TList> EitherPrefix<TCons<F, GS>> for TCons<F, FS>where FS: EitherPrefix<GS> + TList,

source§

impl<F, GS: TList> EitherPrefix<TCons<F, GS>> for TNil

source§

impl<F, FS: TList> EitherPrefix<TNil> for TCons<F, FS>

source§

impl<H: Eq, T: Eq + TList> Eq for TCons<H, T>

source§

impl<H, Ls, Rs: TList> Prefix<TCons<H, Rs>> for TCons<H, Ls>where Ls: Prefix<Rs> + TList,

source§

impl<H, T: TList> StructuralEq for TCons<H, T>

source§

impl<H, T: TList> StructuralPartialEq for TCons<H, T>

Auto Trait Implementations§

§

impl<H, T> RefUnwindSafe for TCons<H, T>where H: RefUnwindSafe, T: RefUnwindSafe,

§

impl<H, T> Send for TCons<H, T>where H: Send, T: Send,

§

impl<H, T> Sync for TCons<H, T>where H: Sync, T: Sync,

§

impl<H, T> Unpin for TCons<H, T>where H: Unpin, T: Unpin,

§

impl<H, T> UnwindSafe for TCons<H, T>where H: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.