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

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

let labelled = field![(n,a,m,e), "joe"];
assert_eq!(labelled.name, "name");
assert_eq!(labelled.value, "joe")Run

Fields

Trait Implementations

impl<Name: PartialEq, Type: PartialEq> PartialEq for Field<Name, Type>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

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]

Returns a copy of the value. Read more

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]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<Name: Hash, Type: Hash> Hash for Field<Name, Type>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<Name, Type> Debug for Field<Name, Type> where
    Type: Debug
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<Name, Type> Send for Field<Name, Type> where
    Name: Send,
    Type: Send

impl<Name, Type> Sync for Field<Name, Type> where
    Name: Sync,
    Type: Sync