Struct frunk_core::labelled::Field
source · 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>,
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>>,
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>,
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>,
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>
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>,
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>,
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.
source§fn transmogrify(self) -> VecDeque<Target>
fn transmogrify(self) -> VecDeque<Target>
impl<Name: Copy, Type: Copy> Copy for Field<Name, Type>
impl<Name: Eq, Type: Eq> Eq for Field<Name, Type>
impl<Name, Type> StructuralPartialEq for Field<Name, Type>
Auto Trait Implementations§
impl<Name, Type> Freeze for Field<Name, Type>where
Type: Freeze,
impl<Name, Type> RefUnwindSafe for Field<Name, Type>where
Type: RefUnwindSafe,
Name: RefUnwindSafe,
impl<Name, Type> Send for Field<Name, Type>
impl<Name, Type> Sync for Field<Name, Type>
impl<Name, Type> Unpin for Field<Name, Type>
impl<Name, Type> UnwindSafe for Field<Name, Type>where
Type: UnwindSafe,
Name: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)