pub struct Field<Name, Type> {
pub name: &'static str,
pub value: Type,
/* private fields */
}
Expand description
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
Fields§
§name: &'static str
§value: Type
Trait Implementations§
Source§impl<Name: Ord, Type: Ord> Ord for Field<Name, Type>
impl<Name: Ord, Type: Ord> Ord for Field<Name, Type>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<Name: PartialOrd, Type: PartialOrd> PartialOrd for Field<Name, Type>
impl<Name: PartialOrd, Type: PartialOrd> PartialOrd for Field<Name, Type>
Source§impl<Key, Source, Target, InnerIndices> Transmogrifier<Box<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Box<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over an Box
in a Field
, transmogrifying the
contained element on the way past.
impl<Key, Source, Target, InnerIndices> Transmogrifier<Box<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Box<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over an Box
in a Field
, transmogrifying the
contained element on the way past.
Source§fn transmogrify(self) -> Box<Target>
fn transmogrify(self) -> Box<Target>
Source§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>>,
Implementation of Transmogrifier
for when the target is an HList
, and the Source
is a plucked
HList
.
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>>,
Implementation of Transmogrifier
for when the target is an HList
, and the Source
is a plucked
HList
.
Source§fn transmogrify(self) -> HCons<TargetHead, TargetTail>
fn transmogrify(self) -> HCons<TargetHead, TargetTail>
Source§impl<Key, Source, Target, InnerIndices> Transmogrifier<LinkedList<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, LinkedList<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over a $container
in a Field
, transmogrifying the
elements on the way past.
impl<Key, Source, Target, InnerIndices> Transmogrifier<LinkedList<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, LinkedList<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over a $container
in a Field
, transmogrifying the
elements on the way past.
Source§fn transmogrify(self) -> LinkedList<Target>
fn transmogrify(self) -> LinkedList<Target>
Source§impl<Key, Source, Target, InnerIndices> Transmogrifier<Option<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Option<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over an Option
in a Field
, transmogrifying the
contained element on the way past if present.
impl<Key, Source, Target, InnerIndices> Transmogrifier<Option<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Option<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over an Option
in a Field
, transmogrifying the
contained element on the way past if present.
Source§fn transmogrify(self) -> Option<Target>
fn transmogrify(self) -> Option<Target>
Source§impl<Key, SourceValue> Transmogrifier<SourceValue, IdentityTransMog> for Field<Key, SourceValue>
Implementation of Transmogrifier
for identity plucked Field
to Field
Transforms.
impl<Key, SourceValue> Transmogrifier<SourceValue, IdentityTransMog> for Field<Key, SourceValue>
Implementation of Transmogrifier
for identity plucked Field
to Field
Transforms.
Source§fn transmogrify(self) -> SourceValue
fn transmogrify(self) -> SourceValue
Source§impl<Source, TargetName, TargetValue, TransmogIndices> Transmogrifier<TargetValue, PluckedLabelledGenericIndicesWrapper<TransmogIndices>> for Field<TargetName, Source>where
Source: LabelledGeneric + Transmogrifier<TargetValue, TransmogIndices>,
TargetValue: LabelledGeneric,
impl<Source, TargetName, TargetValue, TransmogIndices> Transmogrifier<TargetValue, PluckedLabelledGenericIndicesWrapper<TransmogIndices>> for Field<TargetName, Source>where
Source: LabelledGeneric + Transmogrifier<TargetValue, TransmogIndices>,
TargetValue: LabelledGeneric,
Source§fn transmogrify(self) -> TargetValue
fn transmogrify(self) -> TargetValue
Source§impl<Key, Source, Target, InnerIndices> Transmogrifier<Vec<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Vec<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over a $container
in a Field
, transmogrifying the
elements on the way past.
impl<Key, Source, Target, InnerIndices> Transmogrifier<Vec<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, Vec<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
Implementation of Transmogrifier
that maps over a $container
in a Field
, transmogrifying the
elements on the way past.
Source§fn transmogrify(self) -> Vec<Target>
fn transmogrify(self) -> Vec<Target>
Source§impl<Key, Source, Target, InnerIndices> Transmogrifier<VecDeque<Target>, MappingIndicesWrapper<InnerIndices>> for Field<Key, VecDeque<Source>>where
Source: Transmogrifier<Target, InnerIndices>,
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>,
Implementation of Transmogrifier
that maps over a $container
in a Field
, transmogrifying the
elements on the way past.