Function frunk_core::labelled::field_with_name
[−]
[src]
pub fn field_with_name<Label, Value>(
name: &'static str,
value: Value
) -> Field<Label, Value>
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
let l = field_with_name::<(n,a,m,e),_>("name", "joe"); assert_eq!(l.value, "joe"); assert_eq!(l.name, "name");Run