Trait frunk_core::hlist::Selector
[−]
[src]
pub trait Selector<S, I> { fn get(&self) -> &S; }
Trait for retrieving an HList element by type
Required Methods
fn get(&self) -> &S
Allows you to retrieve a unique type from an HList
let h = hlist![1, "hello", true, 42f32]; let f: &f32 = h.get(); let b: &bool = h.get(); assert_eq!(*f, 42f32); assert!(b)