Struct HCons

Source
pub struct HCons<H, T>(/* private fields */);
Expand description

A non-empty type-level list, with head of type H and tail T.

§Type Parameters

  • H: the type of the first element.
  • T: the rest of the list (must itself be an HList).

Trait Implementations§

Source§

impl<HA, TA, HB, TB: HList> IntersectByOrder<HCons<HB, TB>, Equal> for HCons<HA, TA>
where TA: IntersectUnchecked<TB> + HList,

Source§

type Output = HCons<HA, <TA as IntersectUnchecked<TB>>::Output>

The resulting intersected list after ordering dispatch.
Source§

impl<HA, TA: HList, HB, TB: HList> IntersectByOrder<HCons<HB, TB>, Greater> for HCons<HA, TA>
where HCons<HA, TA>: IntersectUnchecked<TB>,

Source§

type Output = <HCons<HA, TA> as IntersectUnchecked<TB>>::Output

The resulting intersected list after ordering dispatch.
Source§

impl<HA, TA, HB, TB: HList> IntersectByOrder<HCons<HB, TB>, Less> for HCons<HA, TA>
where TA: IntersectUnchecked<HCons<HB, TB>> + HList,

Source§

type Output = <TA as IntersectUnchecked<HCons<HB, TB>>>::Output

The resulting intersected list after ordering dispatch.
Source§

impl<HA, TA: HList, HB, TB: HList, Ordering> IntersectUnchecked<HCons<HB, TB>> for HCons<HA, TA>
where HA: Cmp<HB, Output = Ordering>, HCons<HA, TA>: IntersectByOrder<HCons<HB, TB>, Ordering>,

Source§

type Output = <HCons<HA, TA> as IntersectByOrder<HCons<HB, TB>, Ordering>>::Output

The resulting list of elements present in both Self and Other.
Source§

impl<H, T: HList> IntersectUnchecked<HNil> for HCons<H, T>

Source§

type Output = HNil

The resulting list of elements present in both Self and Other.
Source§

impl<H, T: HList> HList for HCons<H, T>

Source§

impl<H, T: HList> NonEmptyHList for HCons<H, T>

Source§

impl<H, HT, TT> SortedHList for HCons<H, HCons<HT, TT>>
where HCons<HT, TT>: SortedHList, H: Cmp<HT>, <H as Cmp<HT>>::Output: LeOrEq,

Source§

impl<H> SortedHList for HCons<H, HNil>

Auto Trait Implementations§

§

impl<H, T> Freeze for HCons<H, T>

§

impl<H, T> RefUnwindSafe for HCons<H, T>

§

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

§

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

§

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

§

impl<H, T> UnwindSafe for HCons<H, T>
where H: UnwindSafe, T: 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<LA, LB> Intersect<LB> for LA

Source§

type Output = <LA as IntersectUnchecked<LB>>::Output

Intersection of two sorted lists. Must itself be an HList.
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.