Struct sdml_core::model::ValueConstructor
source · pub struct ValueConstructor { /* private fields */ }
Expand description
Corresponds to the grammar rule value_constructor
.
Implementations§
source§impl ValueConstructor
impl ValueConstructor
pub fn new(type_name: IdentifierReference, value: SimpleValue) -> 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 type_name(&self) -> &IdentifierReference
pub fn set_type_name(&mut self, type_name: IdentifierReference)
pub fn value(&self) -> &SimpleValue
pub fn set_value(&mut self, value: SimpleValue)
Trait Implementations§
source§impl Clone for ValueConstructor
impl Clone for ValueConstructor
source§fn clone(&self) -> ValueConstructor
fn clone(&self) -> ValueConstructor
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 ValueConstructor
impl Debug for ValueConstructor
source§impl<'de> Deserialize<'de> for ValueConstructor
impl<'de> Deserialize<'de> for ValueConstructor
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 Display for ValueConstructor
impl Display for ValueConstructor
source§impl From<ValueConstructor> for ListMember
impl From<ValueConstructor> for ListMember
source§fn from(v: ValueConstructor) -> Self
fn from(v: ValueConstructor) -> Self
Converts to this type from the input type.
source§impl From<ValueConstructor> for Value
impl From<ValueConstructor> for Value
source§fn from(v: ValueConstructor) -> Self
fn from(v: ValueConstructor) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for ValueConstructor
impl Send for ValueConstructor
impl Sync for ValueConstructor
impl Unpin for ValueConstructor
impl UnwindSafe for ValueConstructor
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