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

name: &'static strvalue: Type

Trait Implementations

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

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

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

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

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

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

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

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

impl<Name, Type> StructuralEq for Field<Name, Type>[src]

impl<Name, Type> StructuralPartialEq for Field<Name, Type>[src]

impl<Key, Source, Target, InnerIndices> Transmogrifier<Box<Target, Global>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Box<Source>> where
    Source: Transmogrifier<Target, InnerIndices>, 
[src]

Implementation of Transmogrifier that maps over an Box in a Field, transmogrifying the contained element on the way past.

impl<SourceHead, SourceTail, TargetName, TargetHead, TargetTail, TransmogHeadIndex, TransmogTailIndices> Transmogrifier<HCons<TargetHead, TargetTail>, HCons<TransmogHeadIndex, TransmogTailIndices>> for Field<TargetName, HCons<SourceHead, SourceTail>> where
    HCons<SourceHead, SourceTail>: Transmogrifier<HCons<TargetHead, TargetTail>, HCons<TransmogHeadIndex, TransmogTailIndices>>, 
[src]

Implementation of Transmogrifier for when the target is an HList, and the Source is a plucked HList.

impl<Key, Source, Target, InnerIndices> Transmogrifier<LinkedList<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, LinkedList<Source>> where
    Source: Transmogrifier<Target, InnerIndices>, 
[src]

Implementation of Transmogrifier that maps over a $container in a Field, transmogrifying the elements on the way past.

impl<Key, Source, Target, InnerIndices> Transmogrifier<Option<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Option<Source>> where
    Source: Transmogrifier<Target, InnerIndices>, 
[src]

Implementation of Transmogrifier that maps over an Option in a Field, transmogrifying the contained element on the way past if present.

impl<Key, SourceValue> Transmogrifier<SourceValue, IdentityTransMog> for Field<Key, SourceValue>[src]

Implementation of Transmogrifier for identity plucked Field to Field Transforms.

impl<Source, TargetName, TargetValue, TransmogIndices> Transmogrifier<TargetValue, PluckedLabelledGenericIndicesWrapper<TransmogIndices>> for Field<TargetName, Source> where
    Source: LabelledGeneric,
    TargetValue: LabelledGeneric,
    Source: Transmogrifier<TargetValue, TransmogIndices>, 
[src]

impl<Key, Source, Target, InnerIndices> Transmogrifier<Vec<Target, Global>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Vec<Source>> where
    Source: Transmogrifier<Target, InnerIndices>, 
[src]

Implementation of Transmogrifier that maps over a $container in a Field, transmogrifying the elements on the way past.

impl<Key, Source, Target, InnerIndices> Transmogrifier<VecDeque<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, VecDeque<Source>> where
    Source: Transmogrifier<Target, InnerIndices>, 
[src]

Implementation of Transmogrifier that maps over a $container in a Field, transmogrifying the elements on the way past.

Auto Trait Implementations

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

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

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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices[src]

type Remainder = Choices

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U, I> LiftInto<U, I> for T where
    U: LiftFrom<T, I>, 
[src]

impl<Source> Sculptor<HNil, HNil> for Source[src]

type Remainder = Source

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.