pub struct NamedField<T, A> {
pub value: T,
pub name: A,
}
Fields§
§value: T
§name: A
Trait Implementations§
Source§impl<T: Clone, A: Clone> Clone for NamedField<T, A>
impl<T: Clone, A: Clone> Clone for NamedField<T, A>
Source§fn clone(&self) -> NamedField<T, A>
fn clone(&self) -> NamedField<T, A>
Returns a copy 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 moreSource§impl<T1, A1: Display> TryUnpack for NamedField<Option<T1>, A1>
impl<T1, A1: Display> TryUnpack for NamedField<Option<T1>, A1>
Source§fn try_unpack(self) -> Result<Self::Unpacked, Self::Error>
fn try_unpack(self) -> Result<Self::Unpacked, Self::Error>
Tries to unpack the value a NamedField<Option<T>, A: Display>
.
If the Option<T>
contains a value, then value is unwrapped from the Option<T>
and returned, discarding the name. Otherwise, the returned value is a Self::Error
is an array containing the name. An array is returned so that Self::Error
is an
iterable like in the TryUnpack
implementation for tuples.
type Unpacked = T1
type Error = Error
impl<T: Copy, A: Copy> Copy for NamedField<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for NamedField<T, A>
impl<T, A> RefUnwindSafe for NamedField<T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
impl<T, A> Send for NamedField<T, A>
impl<T, A> Sync for NamedField<T, A>
impl<T, A> Unpin for NamedField<T, A>
impl<T, A> UnwindSafe for NamedField<T, A>where
T: UnwindSafe,
A: 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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)