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]

[src]

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

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

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]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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]

[src]

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

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

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

[src]

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

1.3.0
[src]

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

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

[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