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 duplicate 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 FromIterator<Annotation> for AnnotationOnlyBody
impl FromIterator<Annotation> for AnnotationOnlyBody
Source§fn from_iter<T: IntoIterator<Item = Annotation>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Annotation>>(iter: T) -> Self
Creates a value from an iterator. Read more
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 BTreeSet<&'a IdentifierReference>)
fn referenced_annotations<'a>( &'a self, names: &mut BTreeSet<&'a IdentifierReference>, )
Source§impl Serialize for Annotation
impl Serialize for Annotation
Source§impl Validate for Annotation
impl Validate for Annotation
fn validate( &self, top: &Module, cache: &impl ModuleStore, loader: &impl ModuleLoader, check_constraints: bool, )
Auto Trait Implementations§
impl Freeze for Annotation
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