Cons

Struct Cons 

Source
pub struct Cons<Tail, Head>
where Tail: CTCons,
{ /* private fields */ }
Expand description

Actual type used to carry cons list information.

This type is useful to create a new cons list in a compact syntax, like the example within the module documentation. Other than for creating new cons lists this structure isn’t useful.

Trait Implementations§

Source§

impl<X, Tail, Head> CTAppend<X> for Cons<Tail, Head>
where X: 'static, Tail: CTCons + 'static, Head: 'static,

Source§

type Output = Cons<Cons<Tail, Head>, X>

The new compile time structure which consists of the implemented structure with X as new item.
Source§

impl<Tail, Head> CTCons for Cons<Tail, Head>
where Tail: CTCons + 'static, Head: 'static,

Source§

type Head = Head

The head of the list. This is exactly one item.
Source§

type Tail = Tail

This is the parent of the implemented type. The tail contains all items except the Head of the implemented type.
Source§

impl<Target, Tail, Head> CTOffset<Target> for Cons<Tail, Head>
where Tail: CTCons + CTOffset<Target> + CTCounter,

Source§

type Offset = <IfCheck<Head> as CTIfOffset<Target, <Tail as CTCounter>::Counter, <Tail as CTOffset<Target>>::Offset>>::Path

The offset representation of the type Target within the implemented compile time structure. Read more
Source§

fn offset() -> usize

Returns a value representing the offset within the compile time structure.
Source§

impl<Tail, Head> CTSized for Cons<Tail, Head>
where Tail: CTCons, Self: CTCounter,

Source§

type Size = <Cons<Tail, Head> as CTCounter>::Counter

The size representation of the implemented compile time structure.
Source§

fn size() -> usize

Returns the amount of items added to the implemented compile time structure.

Auto Trait Implementations§

§

impl<Tail, Head> Freeze for Cons<Tail, Head>

§

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

§

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

§

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

§

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

§

impl<Tail, Head> UnwindSafe for Cons<Tail, Head>
where Tail: UnwindSafe, Head: 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<C> CTOffsetExt for C
where C: CTCons,

Source§

fn offset_of<X>() -> usize
where C: CTOffset<X>,

Returns the offset of the provided type within the implemented compile time structure.
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> Same for T

Source§

type Output = T

Should always be Self
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.