pub struct NamedField<I> {
pub name: String,
pub wrapped_value: I,
}Expand description
SpecifyCreatableStruct’s original intended use case was with user-defined structs, and this structure was designed for convenience, allowing the implementor to store both a Stringification of the field’s name,
and the field’s value. Note that it is also the type that the argument passed to create_struct must iterate over.
Fields§
§name: StringIntended to hold the name of the field wrapped_value should be assigned to
wrapped_value: IIntended to hold the value to be assigned to a given field in the target struct
Trait Implementations§
Source§impl<I: Clone> Clone for NamedField<I>
impl<I: Clone> Clone for NamedField<I>
Source§fn clone(&self) -> NamedField<I>
fn clone(&self) -> NamedField<I>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<I> Freeze for NamedField<I>where
I: Freeze,
impl<I> RefUnwindSafe for NamedField<I>where
I: RefUnwindSafe,
impl<I> Send for NamedField<I>where
I: Send,
impl<I> Sync for NamedField<I>where
I: Sync,
impl<I> Unpin for NamedField<I>where
I: Unpin,
impl<I> UnwindSafe for NamedField<I>where
I: 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
Mutably borrows from an owned value. Read more