Struct sdml_core::model::definitions::ValueVariant
source · pub struct ValueVariant { /* private fields */ }
Expand description
Corresponds to the grammar rule enum_variant
.
Implementations§
source§impl ValueVariant
impl ValueVariant
pub fn new(name: Identifier) -> Self
Trait Implementations§
source§impl Clone for ValueVariant
impl Clone for ValueVariant
source§fn clone(&self) -> ValueVariant
fn clone(&self) -> ValueVariant
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 Debug for ValueVariant
impl Debug for ValueVariant
source§impl<'de> Deserialize<'de> for ValueVariant
impl<'de> Deserialize<'de> for ValueVariant
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 HasName for ValueVariant
impl HasName for ValueVariant
source§fn name(&self) -> &Identifier
fn name(&self) -> &Identifier
Get the name of the enclosing type.
source§fn set_name(&mut self, name: Identifier)
fn set_name(&mut self, name: Identifier)
Set the name of the enclosing type.
source§impl HasSourceSpan for ValueVariant
impl HasSourceSpan for ValueVariant
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
source§impl HasVariants<ValueVariant> for EnumBody
impl HasVariants<ValueVariant> for EnumBody
fn has_variants(&self) -> bool
fn variants_len(&self) -> usize
fn variants(&self) -> Box<dyn Iterator<Item = &ValueVariant> + '_>
fn variants_mut(&mut self) -> Box<dyn Iterator<Item = &mut ValueVariant> + '_>
fn add_to_variants(&mut self, value: ValueVariant)
fn extend_variants<I>(&mut self, extension: I)where
I: IntoIterator<Item = ValueVariant>,
source§impl References for ValueVariant
impl References for ValueVariant
fn referenced_annotations<'a>( &'a self, names: &mut HashSet<&'a IdentifierReference> )
fn referenced_types<'a>(&'a self, names: &mut HashSet<&'a IdentifierReference>)
source§impl Serialize for ValueVariant
impl Serialize for ValueVariant
Auto Trait Implementations§
impl RefUnwindSafe for ValueVariant
impl Send for ValueVariant
impl Sync for ValueVariant
impl Unpin for ValueVariant
impl UnwindSafe for ValueVariant
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