pub struct Statement { /* private fields */ }
Expand description
Simple, in-memory implementation of the Statement
trait.
Implementations§
Source§impl Statement
impl Statement
pub fn new<S, O>(subject: S, predicate: Iri, object: O) -> Self
pub fn rdf_type<S, O>(subject: S, object: O) -> Self
Sourcepub fn subject(&self) -> &SubjectNode
pub fn subject(&self) -> &SubjectNode
Return the subject of this statement.
Sourcepub fn set_subject(&mut self, subject: SubjectNode)
pub fn set_subject(&mut self, subject: SubjectNode)
Set the value of this statement’s subject.
Sourcepub fn set_predicate(&mut self, predicate: Iri)
pub fn set_predicate(&mut self, predicate: Iri)
Set the value of this statement’s predicate.
Sourcepub fn object(&self) -> &ObjectNode
pub fn object(&self) -> &ObjectNode
Return the object of this statement.
Sourcepub fn set_object(&mut self, object: ObjectNode)
pub fn set_object(&mut self, object: ObjectNode)
Set the value of this statement’s object.
Sourcepub fn is_nested(&self) -> bool
pub fn is_nested(&self) -> bool
This statement is considered nested if either subject or object is itself a statement (RDF-star)
Sourcepub fn reify(&self) -> Result<(SubjectNode, Vec<Self>)>
pub fn reify(&self) -> Result<(SubjectNode, Vec<Self>)>
Reify a single statement, returning the list of resulting statements.
Trait Implementations§
Source§impl Featured for Statement
impl Featured for Statement
Source§fn supports_feature(&self, feature: &Iri) -> bool
fn supports_feature(&self, feature: &Iri) -> bool
Return true if this instance, or factory, supports the feature identified by the Iri.
Source§impl From<&Statement> for Collection
impl From<&Statement> for Collection
Source§impl From<&Statement> for ObjectNode
impl From<&Statement> for ObjectNode
Source§impl From<&Statement> for SubjectNode
impl From<&Statement> for SubjectNode
Source§impl From<Statement> for Collection
impl From<Statement> for Collection
Source§impl From<Statement> for ObjectNode
impl From<Statement> for ObjectNode
Source§impl From<Statement> for SubjectNode
impl From<Statement> for SubjectNode
Source§impl FromIterator<Statement> for Graph
impl FromIterator<Statement> for Graph
Source§impl Ord for Statement
impl Ord for Statement
Source§impl PartialEq<Statement> for ObjectNode
impl PartialEq<Statement> for ObjectNode
Source§impl PartialEq<Statement> for SubjectNode
impl PartialEq<Statement> for SubjectNode
Source§impl PartialOrd for Statement
impl PartialOrd for Statement
impl Eq for Statement
impl StructuralPartialEq for Statement
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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