pub struct VariantValue {
pub discriminant: Enumerator,
pub alternative: Option<String>,
pub value: Option<Value>,
}Expand description
The content of a variant record value.
Fields§
§discriminant: EnumeratorThe discriminant.
alternative: Option<String>Name of the alternative the discriminant selects. Decoding sets it when the FOM names the alternative; encoding checks it when it is given.
value: Option<Value>The value of the alternative; None when the discriminant carries no data. An alternative of an
HLAextendableVariantRecord that the FDD does not define is Value::Raw.
Trait Implementations§
Source§impl Clone for VariantValue
impl Clone for VariantValue
Source§impl Debug for VariantValue
impl Debug for VariantValue
Source§impl<'de> Deserialize<'de> for VariantValue
impl<'de> Deserialize<'de> for VariantValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<VariantValue> for Value
impl From<VariantValue> for Value
Source§fn from(variant: VariantValue) -> Self
fn from(variant: VariantValue) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VariantValue
impl PartialEq for VariantValue
Source§impl Serialize for VariantValue
impl Serialize for VariantValue
impl StructuralPartialEq for VariantValue
Auto Trait Implementations§
impl Forget for VariantValue
impl Freeze for VariantValuewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const Enumerator is !null: Freeze,
PhantomData<Enumerator>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<(String, Value)>: Freeze,
*const VariantValue is !null: Freeze,
PhantomData<VariantValue>: Freeze,
impl Move for VariantValue
impl RefUnwindSafe for VariantValue
impl Send for VariantValue
impl Sync for VariantValue
impl Unpin for VariantValue
impl UnsafeUnpin for VariantValuewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Enumerator is !null: UnsafeUnpin,
PhantomData<Enumerator>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
*const VariantValue is !null: UnsafeUnpin,
PhantomData<VariantValue>: UnsafeUnpin,
impl UnwindSafe for VariantValue
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