Cons

Struct Cons 

Source
pub struct Cons<T, L: PeanoInt> {
    pub elem: T,
    pub next: NList<T, L::SubOneSat>,
    /* private fields */
}
Expand description

A node of NList with one element and the rest of the list.

Fields§

§elem: T

The element of this node

§next: NList<T, L::SubOneSat>

The rest of the list

Auto Trait Implementations§

§

impl<T, L> Freeze for Cons<T, L>
where T: Freeze, <<<L as PeanoInt>::SubOneSat as PeanoInt>::IsZero as Boolean>::IfTrue<Nil<T, <L as PeanoInt>::SubOneSat>, Cons<T, <L as PeanoInt>::SubOneSat>>: Freeze,

§

impl<T, L> RefUnwindSafe for Cons<T, L>

§

impl<T, L> Send for Cons<T, L>
where T: Send, <<<L as PeanoInt>::SubOneSat as PeanoInt>::IsZero as Boolean>::IfTrue<Nil<T, <L as PeanoInt>::SubOneSat>, Cons<T, <L as PeanoInt>::SubOneSat>>: Send,

§

impl<T, L> Sync for Cons<T, L>
where T: Sync, <<<L as PeanoInt>::SubOneSat as PeanoInt>::IsZero as Boolean>::IfTrue<Nil<T, <L as PeanoInt>::SubOneSat>, Cons<T, <L as PeanoInt>::SubOneSat>>: Sync,

§

impl<T, L> Unpin for Cons<T, L>
where T: Unpin, <<<L as PeanoInt>::SubOneSat as PeanoInt>::IsZero as Boolean>::IfTrue<Nil<T, <L as PeanoInt>::SubOneSat>, Cons<T, <L as PeanoInt>::SubOneSat>>: Unpin,

§

impl<T, L> UnwindSafe for Cons<T, L>
where T: UnwindSafe, <<<L as PeanoInt>::SubOneSat as PeanoInt>::IsZero as Boolean>::IfTrue<Nil<T, <L as PeanoInt>::SubOneSat>, Cons<T, <L as PeanoInt>::SubOneSat>>: 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, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
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<'a, T> Receiver<'a, T> for T
where T: 'a,

Source§

type Hkt = ValueHkt<'a>

Marker type for abstractly representing values/references/mutable references
Source§

const RECEIVER_WIT: ReceiverWit<'a, Self, T> = _

Witness for whether Self is a T,&'a T, or &'a mut T.
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.