pub trait IntoValueLabelled {
    type Output;

    // Required method
    fn into_value_labelled(self) -> Self::Output;
Expand description

A trait that strips type-level strings from the labels

Required Associated Types§

type Output

Required Methods§

fn into_value_labelled(self) -> Self::Output

Turns the current HList into a value-labelled one.

Effectively extracts the names and values held inside the individual Fields and puts them into ValueFields, which do not have type-level names.

use frunk::labelled::{ValueField, IntoValueLabelled};
use frunk::labelled::chars::*;
use frunk_core::{field, hlist, HList};

let labelled_hlist = hlist![
    field!((n, a, m, e), "joe"),
    field!((a, g, e), 3)
// Notice the lack of type-level names
let value_labelled: HList![ValueField<&str>, ValueField<isize>] = labelled_hlist.into_value_labelled();

    ValueField {
      name: "name",
      value: "joe",
    ValueField {
      name: "age",
      value: 3,



impl IntoValueLabelled for HNil


type Output = HNil


impl<Label, Value, Tail> IntoValueLabelled for HCons<Field<Label, Value>, Tail>
where Tail: IntoValueLabelled,


type Output = HCons<ValueField<Value>, <Tail as IntoValueLabelled>::Output>