Struct frunk::indices::There

source ·
pub struct There<T> { /* private fields */ }
Expand description

Used as an index into an HList.

There<T> is 1 + T.

Users should normally allow type inference to create this type.

Trait Implementations§

source§

impl<Head, Tail, K, TailIndex> ByNameFieldPlucker<K, There<TailIndex>> for HCons<Head, Tail>
where Tail: ByNameFieldPlucker<K, TailIndex>,

Implementation when the pluck target key is in the tail.

§

type TargetValue = <Tail as ByNameFieldPlucker<K, TailIndex>>::TargetValue

§

type Remainder = HCons<Head, <Tail as ByNameFieldPlucker<K, TailIndex>>::Remainder>

source§

fn pluck_by_name( self ) -> (Field<K, <HCons<Head, Tail> as ByNameFieldPlucker<K, There<TailIndex>>>::TargetValue>, <HCons<Head, Tail> as ByNameFieldPlucker<K, There<TailIndex>>>::Remainder)

Returns a pair consisting of the value pointed to by the target key and the remainder.
source§

impl<Head, I, Tail, TailIndex> CoprodInjector<I, There<TailIndex>> for Coproduct<Head, Tail>
where Tail: CoprodInjector<I, TailIndex>,

source§

fn inject(to_insert: I) -> Coproduct<Head, Tail>

Instantiate a coproduct from an element. Read more
source§

impl<Hd, Tl, T, N> CoprodUninjector<T, There<N>> for Coproduct<Hd, Tl>
where Tl: CoprodUninjector<T, N>,

§

type Remainder = Coproduct<Hd, <Tl as CoprodUninjector<T, N>>::Remainder>

source§

fn uninject( self ) -> Result<T, <Coproduct<Hd, Tl> as CoprodUninjector<T, There<N>>>::Remainder>

Attempt to extract a value from a coproduct (or get the remaining possibilities). Read more
source§

impl<Head, FromTail, Tail, TailIndex> CoproductSelector<FromTail, There<TailIndex>> for Coproduct<Head, Tail>
where Tail: CoproductSelector<FromTail, TailIndex>,

source§

fn get(&self) -> Option<&FromTail>

Borrow an element from a coproduct by type. Read more
source§

impl<Head, FromTail, Tail, TailIndex> CoproductTaker<FromTail, There<TailIndex>> for Coproduct<Head, Tail>
where Tail: CoproductTaker<FromTail, TailIndex>,

source§

fn take(self) -> Option<FromTail>

Retrieve an element from a coproduct by type, ignoring all others. Read more
source§

impl<Head, Tail, ValAtIx, TailIx> LiftFrom<ValAtIx, There<TailIx>> for HCons<Head, Tail>
where Head: Default, Tail: HList + LiftFrom<ValAtIx, TailIx>,

source§

fn lift_from(part: ValAtIx) -> HCons<Head, Tail>

Performs the indexed conversion.
source§

impl<Head, Tail, FromTail, TailIndex> Plucker<FromTail, There<TailIndex>> for HCons<Head, Tail>
where Tail: Plucker<FromTail, TailIndex>,

Implementation when the pluck target is in the tail

§

type Remainder = HCons<Head, <Tail as Plucker<FromTail, TailIndex>>::Remainder>

What is left after you pluck the target from the Self
source§

fn pluck( self ) -> (FromTail, <HCons<Head, Tail> as Plucker<FromTail, There<TailIndex>>>::Remainder)

Remove an element by type from an HList. Read more
source§

impl<Head, Tail, FromTail, TailIndex> Selector<FromTail, There<TailIndex>> for HCons<Head, Tail>
where Tail: Selector<FromTail, TailIndex>,

source§

fn get(&self) -> &FromTail

Borrow an element by type from an HList. Read more
source§

fn get_mut(&mut self) -> &mut FromTail

Mutably borrow an element by type from an HList. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for There<T>
where T: RefUnwindSafe,

§

impl<T> Send for There<T>
where T: Send,

§

impl<T> Sync for There<T>
where T: Sync,

§

impl<T> Unpin for There<T>
where T: Unpin,

§

impl<T> UnwindSafe for There<T>
where 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<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

source§

fn subset( self ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) 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, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

source§

fn lift_into(self) -> U

Performs the indexed conversion.
source§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
source§

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

§

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>,

§

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.