pub struct EnumVariant<'host> { /* private fields */ }Expand description
An instance of an EnumType.
Use EnumVariant::variant to determine which variant this is intended to be,
and EnumVariant::contents to read that variant’s value.
If you’re interested in the EnumType this variant corresponds to, you
can use EnumVariant::definition. Conversely if you care only about the
enum’s reported name and value and not the type it originated from, use
EnumVariant::unwrap.
Implementations§
Trait Implementations§
Source§impl<'host> Clone for EnumVariant<'host>
impl<'host> Clone for EnumVariant<'host>
Source§fn clone(&self) -> EnumVariant<'host>
fn clone(&self) -> EnumVariant<'host>
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 moreSource§impl<'host> Debug for EnumVariant<'host>
impl<'host> Debug for EnumVariant<'host>
Source§impl<'host, T> From<T> for EnumVariant<'host>where
T: Borrow<StaticEnumVariant>,
impl<'host, T> From<T> for EnumVariant<'host>where
T: Borrow<StaticEnumVariant>,
Source§fn from(value: T) -> EnumVariant<'host>
fn from(value: T) -> EnumVariant<'host>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'host> Freeze for EnumVariant<'host>
impl<'host> !RefUnwindSafe for EnumVariant<'host>
impl<'host> !Send for EnumVariant<'host>
impl<'host> !Sync for EnumVariant<'host>
impl<'host> Unpin for EnumVariant<'host>
impl<'host> !UnwindSafe for EnumVariant<'host>
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