pub fn field_with_name<Label, Value>(
    name: &'static str,
    value: Value
) -> Field<Label, Value>
Expand description

Returns a new Field for a given value and custom name.

If you don’t want to provide a custom name and want to rely on the type you provide to build a name, then please use the field! macro.

Examples

use frunk::labelled::chars::*;
use frunk::labelled::field_with_name;

let l = field_with_name::<(n,a,m,e),_>("name", "joe");
assert_eq!(l.value, "joe");
assert_eq!(l.name, "name");
Run