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) -> Self
pub fn with_body(self, body: AnnotationOnlyBody) -> Self
Trait Implementations§
Source§impl AnnotationBuilder for ValueVariant
impl AnnotationBuilder for ValueVariant
fn with_predicate<I, V>(self, predicate: I, value: V) -> Self
fn with_type<I>(self, name: I) -> Self
fn with_super_class<I>(self, name: I) -> Self
fn with_equivalent_class<I>(self, name: I) -> Self
fn with_super_property<I>(self, name: I) -> Self
fn with_domain<I>(self, name: I) -> Self
fn with_comment<S>(self, comment: S) -> Self
fn with_label<S>(self, label: S) -> Self
fn with_see_also_str(self, resource: &str) -> Selfwhere
Self: Sized,
fn with_see_also(self, resource: Url) -> Selfwhere
Self: Sized,
fn with_see_also_ref<I>(self, resource: I) -> Self
fn with_is_defined_by(self, resource: Url) -> Selfwhere
Self: Sized,
fn with_is_defined_by_str(self, resource: &str) -> Selfwhere
Self: Sized,
fn with_is_defined_by_ref<I>(self, resource: I) -> Self
fn with_range<I>(self, name: I) -> Self
Source§impl Clone for ValueVariant
impl Clone for ValueVariant
Source§fn clone(&self) -> ValueVariant
fn clone(&self) -> ValueVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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
Source§impl HasName for ValueVariant
impl HasName for ValueVariant
Source§fn name(&self) -> &Identifier
fn name(&self) -> &Identifier
Get the name of the enclosing type.
Source§fn set_name(&mut self, name: Identifier)
fn set_name(&mut self, name: Identifier)
Set the name of the enclosing type.
Source§impl HasOptionalBody for ValueVariant
impl HasOptionalBody for ValueVariant
Source§type Body = AnnotationOnlyBody
type Body = AnnotationOnlyBody
This type is the particular body for the enclosing type.
fn body(&self) -> Option<&Self::Body>
fn body_mut(&mut self) -> Option<&mut Self::Body>
fn set_body(&mut self, body: Self::Body)
fn unset_body(&mut self)
fn with_body(self, body: Self::Body) -> Selfwhere
Self: Sized,
fn has_body(&self) -> bool
Source§impl HasSourceSpan for ValueVariant
impl HasSourceSpan for ValueVariant
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 ValueVariant
impl References for ValueVariant
fn referenced_annotations<'a>( &'a self, names: &mut BTreeSet<&'a IdentifierReference>, )
fn referenced_types<'a>(&'a self, names: &mut BTreeSet<&'a IdentifierReference>)
Source§impl Serialize for ValueVariant
impl Serialize for ValueVariant
Source§impl Validate for ValueVariant
impl Validate for ValueVariant
fn validate( &self, top: &Module, _cache: &impl ModuleStore, loader: &impl ModuleLoader, _check_constraints: bool, )
Auto Trait Implementations§
impl Freeze for ValueVariant
impl RefUnwindSafe for ValueVariant
impl Send for ValueVariant
impl Sync for ValueVariant
impl Unpin for ValueVariant
impl UnsafeUnpin 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