Trait frunk_core::hlist::Plucker [] [src]

pub trait Plucker<Target, Index> {
    type Remainder;
    fn pluck(self) -> (Target, Self::Remainder);
}

Trait defining extraction from a given HList

Similar to Selector, but returns the target and the remainder of the list (w/o target) in a pair.

Associated Types

What is left after you pluck the target from the Self

Required Methods

Returns the target with the remainder of the list in a pair

Examples

let h = hlist![1, "hello", true, 42f32];
let (t, r): (bool, _) = h.pluck();
assert!(t);
assert_eq!(r, hlist![1, "hello", 42f32])Run

Implementors