pub struct Quad {
pub subject: Subject,
pub predicate: NamedNode,
pub object: Term,
pub graph_name: GraphName,
}
Expand description
An owned triple in an RDF dataset.
The default string formatter is returning an N-Quads compatible representation:
use oxrdf::{Quad, NamedNode};
assert_eq!(
"<http://example.com/s> <http://example.com/p> <http://example.com/o> <http://example.com/g>",
Quad {
subject: NamedNode::new("http://example.com/s")?.into(),
predicate: NamedNode::new("http://example.com/p")?,
object: NamedNode::new("http://example.com/o")?.into(),
graph_name: NamedNode::new("http://example.com/g")?.into(),
}.to_string()
);
Fields§
§subject: Subject
The subject of this triple.
predicate: NamedNode
The predicate of this triple.
object: Term
The object of this triple.
graph_name: GraphName
The name of the RDF graph in which the triple is.
Implementations§
Trait Implementations§
source§impl Extend<Quad> for Dataset
impl Extend<Quad> for Dataset
source§fn extend<I: IntoIterator<Item = Quad>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Quad>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl FromIterator<Quad> for Dataset
impl FromIterator<Quad> for Dataset
source§impl PartialEq<Quad> for Quad
impl PartialEq<Quad> for Quad
impl Eq for Quad
impl StructuralEq for Quad
impl StructuralPartialEq for Quad
Auto Trait Implementations§
impl RefUnwindSafe for Quad
impl Send for Quad
impl Sync for Quad
impl Unpin for Quad
impl UnwindSafe for Quad
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