Struct sdml_core::model::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, value: u32) -> Self
pub fn new_with(name: Identifier, value: u32, body: AnnotationOnlyBody) -> Self
pub fn with_ts_span(self, ts_span: Span) -> Self
pub fn has_ts_span(&self) -> bool
pub fn ts_span(&self) -> Option<&Span>
pub fn set_ts_span(&mut self, span: Span)
pub fn unset_ts_span(&mut self)
pub fn name(&self) -> &Identifier
pub fn set_name(&mut self, name: Identifier)
pub fn value(&self) -> u32
pub fn set_value(&mut self, value: u32)
pub fn has_body(&self) -> bool
pub fn body(&self) -> Option<&AnnotationOnlyBody>
pub fn set_body(&mut self, body: AnnotationOnlyBody)
pub fn unset_body(&mut self)
pub fn referenced_annotations(&self) -> HashSet<&IdentifierReference>
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
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