Enum sdml_core::model::Annotation
source · pub enum Annotation {
Property(AnnotationProperty),
Constraint(Constraint),
}
Expand description
Corresponds to the grammar rule annotation
.
Variants§
Property(AnnotationProperty)
Constraint(Constraint)
Implementations§
source§impl Annotation
impl Annotation
pub fn has_ts_span(&self) -> bool
pub fn ts_span(&self) -> Option<&Span>
pub fn is_annotation_property(&self) -> bool
pub fn as_annotation_property(&self) -> Option<&AnnotationProperty>
pub fn is_constraint(&self) -> bool
pub fn as_constraint(&self) -> Option<&Constraint>
pub fn referenced_types(&self) -> HashSet<&IdentifierReference>
Trait Implementations§
source§impl Clone for Annotation
impl Clone for Annotation
source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
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 Annotation
impl Debug for Annotation
source§impl<'de> Deserialize<'de> for Annotation
impl<'de> Deserialize<'de> for Annotation
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<AnnotationProperty> for Annotation
impl From<AnnotationProperty> for Annotation
source§fn from(value: AnnotationProperty) -> Self
fn from(value: AnnotationProperty) -> Self
Converts to this type from the input type.
source§impl From<Constraint> for Annotation
impl From<Constraint> for Annotation
source§fn from(value: Constraint) -> Self
fn from(value: Constraint) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnwindSafe for Annotation
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