Struct frunk_core::labelled::Field
[−]
[src]
pub struct Field<Name, Type> { pub name: &'static str, pub value: Type, // some fields omitted }
A Label contains a type-level Name, a runtime value, and
a reference to a &'static str
name.
To construct one, use the field!
macro.
Examples
let labelled = field![(n,a,m,e), "joe"]; assert_eq!(labelled.name, "name"); assert_eq!(labelled.value, "joe")Run
Fields
name: &'static str
value: Type
Trait Implementations
impl<Name: PartialEq, Type: PartialEq> PartialEq for Field<Name, Type>
[src]
fn eq(&self, __arg_0: &Field<Name, Type>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Field<Name, Type>) -> bool
This method tests for !=
.
impl<Name: Eq, Type: Eq> Eq for Field<Name, Type>
[src]
impl<Name: Clone, Type: Clone> Clone for Field<Name, Type>
[src]
fn clone(&self) -> Field<Name, Type>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<Name: Copy, Type: Copy> Copy for Field<Name, Type>
[src]
impl<Name: PartialOrd, Type: PartialOrd> PartialOrd for Field<Name, Type>
[src]
fn partial_cmp(&self, __arg_0: &Field<Name, Type>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Field<Name, Type>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Field<Name, Type>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Field<Name, Type>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Field<Name, Type>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<Name: Ord, Type: Ord> Ord for Field<Name, Type>
[src]
fn cmp(&self, __arg_0: &Field<Name, Type>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl<Name, Type> Debug for Field<Name, Type> where
Type: Debug,
[src]
Type: Debug,