Struct Cons

Source
pub struct Cons<Value, Tail>(/* private fields */)
where
    Value: Bit,
    Tail: List;
Expand description

Node of list, consists of value (Bit) and tail – List.

Trait Implementations§

Source§

impl<Value, Tail> Debug for Cons<Value, Tail>
where Value: Bit + Debug, Tail: List + Debug,

Source§

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

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

impl<Value, Tail> List for Cons<Value, Tail>
where Value: Bit, Tail: List,

Source§

fn val() -> Vec<bool>

Real, represented with rust’s objects value of type.
Source§

fn new() -> Self

Real value of type.
Source§

impl<LeftNew, ValueNew, ValuePrev, RightPrev, Default, Next> Runner<Cons<ValueNew, LeftNew>, ValuePrev, RightPrev, Default> for Left<Next>
where LeftNew: List, ValueNew: Bit, ValuePrev: Bit, RightPrev: List, Next: Runner<LeftNew, ValueNew, Cons<ValuePrev, RightPrev>, Default>, Default: Bit,

Source§

type Run = <Next as Runner<<State<LeftNew, ValueNew, Cons<ValuePrev, RightPrev>, Default> as StateTrait>::Left, <State<LeftNew, ValueNew, Cons<ValuePrev, RightPrev>, Default> as StateTrait>::Value, <State<LeftNew, ValueNew, Cons<ValuePrev, RightPrev>, Default> as StateTrait>::Right, <State<LeftNew, ValueNew, Cons<ValuePrev, RightPrev>, Default> as StateTrait>::Default>>::Run

Result of running on State<Left, Value, Right>.
Source§

impl<LeftPrev, ValuePrev, ValueNew, RightNew, Next, Default> Runner<LeftPrev, ValuePrev, Cons<ValueNew, RightNew>, Default> for Right<Next>
where LeftPrev: List, ValuePrev: Bit, ValueNew: Bit, RightNew: List, Next: Runner<Cons<ValuePrev, LeftPrev>, ValueNew, RightNew, Default>, Default: Bit,

Source§

type Run = <Next as Runner<<State<Cons<ValuePrev, LeftPrev>, ValueNew, RightNew, Default> as StateTrait>::Left, <State<Cons<ValuePrev, LeftPrev>, ValueNew, RightNew, Default> as StateTrait>::Value, <State<Cons<ValuePrev, LeftPrev>, ValueNew, RightNew, Default> as StateTrait>::Right, <State<Cons<ValuePrev, LeftPrev>, ValueNew, RightNew, Default> as StateTrait>::Default>>::Run

Result of running on State<Left, Value, Right>.

Auto Trait Implementations§

§

impl<Value, Tail> Freeze for Cons<Value, Tail>
where Value: Freeze, Tail: Freeze,

§

impl<Value, Tail> RefUnwindSafe for Cons<Value, Tail>
where Value: RefUnwindSafe, Tail: RefUnwindSafe,

§

impl<Value, Tail> Send for Cons<Value, Tail>
where Value: Send, Tail: Send,

§

impl<Value, Tail> Sync for Cons<Value, Tail>
where Value: Sync, Tail: Sync,

§

impl<Value, Tail> Unpin for Cons<Value, Tail>
where Value: Unpin, Tail: Unpin,

§

impl<Value, Tail> UnwindSafe for Cons<Value, Tail>
where Value: UnwindSafe, Tail: 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, 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<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.