Enum sdml_core::model::annotations::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 const fn is_annotation_property(&self) -> bool
pub const fn as_annotation_property(&self) -> Option<&AnnotationProperty>
pub const fn is_constraint(&self) -> bool
pub const fn as_constraint(&self) -> Option<&Constraint>
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.
source§impl HasSourceSpan for Annotation
impl HasSourceSpan for Annotation
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 References for Annotation
impl References for Annotation
fn referenced_types<'a>(&'a self, names: &mut HashSet<&'a IdentifierReference>)
fn referenced_annotations<'a>( &'a self, names: &mut HashSet<&'a IdentifierReference> )
source§impl Serialize for Annotation
impl Serialize for Annotation
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