pub struct EnumFieldRef<E, T> { /* private fields */ }
Expand description
A OptionFieldRef
references a field within an enum constant.
Implementations§
Trait Implementations§
Source§impl<E, T> Clone for EnumFieldRef<E, T>
impl<E, T> Clone for EnumFieldRef<E, T>
Source§impl<'x, E: 'x, T: 'x> OptionFieldRef<'x> for EnumFieldRef<E, T>
impl<'x, E: 'x, T: 'x> OptionFieldRef<'x> for EnumFieldRef<E, T>
type Input = E
type Output = T
Source§fn get<'a>(&'a self, e: &'x Self::Input) -> Option<&'x Self::Output>
fn get<'a>(&'a self, e: &'x Self::Input) -> Option<&'x Self::Output>
Get a reference of value in an object to which
OptionFieldRef
refers. Read moreSource§fn get_mut<'a>(&'a self, e: &'x mut Self::Input) -> Option<&'x mut Self::Output>
fn get_mut<'a>(&'a self, e: &'x mut Self::Input) -> Option<&'x mut Self::Output>
Get a mutable reference of value in an object to which
OptionFieldRef
refers. Read moreSource§fn chain<FR, R: 'x>(&self, fr: FR) -> OptionFieldRefChain<Self, FR>
fn chain<FR, R: 'x>(&self, fr: FR) -> OptionFieldRefChain<Self, FR>
Chains two field references. Read more
impl<E, T> Copy for EnumFieldRef<E, T>
Auto Trait Implementations§
impl<E, T> Freeze for EnumFieldRef<E, T>
impl<E, T> RefUnwindSafe for EnumFieldRef<E, T>
impl<E, T> Send for EnumFieldRef<E, T>
impl<E, T> Sync for EnumFieldRef<E, T>
impl<E, T> Unpin for EnumFieldRef<E, T>
impl<E, T> UnwindSafe for EnumFieldRef<E, T>
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