pub struct Annotation {
pub graph: GraphName,
pub triple: Triple,
pub reifier: NamedOrBlankNode,
pub properties: Vec<(NamedNode, Term)>,
}Expand description
An annotation: properties about one asserted statement in one graph.
Fields§
§graph: GraphNameThe graph holding the statement and its annotation.
triple: TripleThe annotated statement.
reifier: NamedOrBlankNodeThe resource standing for the statement (the reifier). A store may rename it: tiramemsu resolves every reifier of a statement to the statement’s own id.
properties: Vec<(NamedNode, Term)>The annotation’s properties, such as a confidence or the journal entry that caused it.
Implementations§
Source§impl Annotation
impl Annotation
Sourcepub fn new(graph: impl Into<GraphName>, triple: Triple) -> Self
pub fn new(graph: impl Into<GraphName>, triple: Triple) -> Self
An annotation of triple in graph with a fresh blank node reifier.
Sourcepub fn with_reifier(self, r: impl Into<NamedOrBlankNode>) -> Self
pub fn with_reifier(self, r: impl Into<NamedOrBlankNode>) -> Self
This annotation with reifier r.
Sourcepub fn with(self, key: NamedNode, value: impl Into<Term>) -> Self
pub fn with(self, key: NamedNode, value: impl Into<Term>) -> Self
This annotation with one more property.
Sourcepub fn same_content(&self, other: &Annotation) -> bool
pub fn same_content(&self, other: &Annotation) -> bool
True when both annotate the same statement in the same graph with the same set of properties, whatever their reifiers.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§impl Debug for Annotation
impl Debug for Annotation
impl Eq for Annotation
Source§impl PartialEq for Annotation
impl PartialEq for Annotation
impl StructuralPartialEq for Annotation
Auto Trait Implementations§
impl Forget for Annotation
impl Freeze for Annotation
impl Move for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnsafeUnpin 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