pub struct AnnotationFact { /* private fields */ }Expand description
An independently identified schema annotation fact.
Implementations§
Source§impl AnnotationFact
impl AnnotationFact
Sourcepub fn new(
id: AnnotationFactId,
value: SchemaAnnotationValue,
) -> Result<Self, Diagnostic>
pub fn new( id: AnnotationFactId, value: SchemaAnnotationValue, ) -> Result<Self, Diagnostic>
Construct and validate an annotation fact.
Sourcepub const fn id(&self) -> &AnnotationFactId
pub const fn id(&self) -> &AnnotationFactId
Return the annotation identity.
Sourcepub const fn value(&self) -> &SchemaAnnotationValue
pub const fn value(&self) -> &SchemaAnnotationValue
Return the validated payload.
Trait Implementations§
Source§impl Clone for AnnotationFact
impl Clone for AnnotationFact
Source§fn clone(&self) -> AnnotationFact
fn clone(&self) -> AnnotationFact
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 AnnotationFact
impl Debug for AnnotationFact
impl Eq for AnnotationFact
Source§impl PartialEq for AnnotationFact
impl PartialEq for AnnotationFact
Source§impl Serialize for AnnotationFact
impl Serialize for AnnotationFact
impl StructuralPartialEq for AnnotationFact
Auto Trait Implementations§
impl Freeze for AnnotationFact
impl RefUnwindSafe for AnnotationFact
impl Send for AnnotationFact
impl Sync for AnnotationFact
impl Unpin for AnnotationFact
impl UnsafeUnpin for AnnotationFact
impl UnwindSafe for AnnotationFact
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