pub struct Quad<S = Id, P = IriBuf, O = Object, G = GraphLabel>(pub S, pub P, pub O, pub Option<G>);
Expand description
RDF quad.
Tuple Fields§
§0: S
§1: P
§2: O
§3: Option<G>
Implementations§
source§impl<S, L> Quad<Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>>
impl<S, L> Quad<Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>>
pub fn inserted_into<V: VocabularyMut>( &self, vocabulary: &mut V ) -> Triple<Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>>where S: Clone, L: Clone,
pub fn insert_into<V: VocabularyMut>( self, vocabulary: &mut V ) -> Triple<Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>>
source§impl<S, L> Quad<Id, IriBuf, Object<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, GraphLabel>
impl<S, L> Quad<Id, IriBuf, Object<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, GraphLabel>
pub fn inserted_into<V: VocabularyMut>( &self, vocabulary: &mut V ) -> Quad<Id<V::Iri, V::BlankId>, V::Iri, Object<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, GraphLabel<V::Iri, V::BlankId>>where S: Clone, L: Clone,
pub fn insert_into<V: VocabularyMut>( self, vocabulary: &mut V ) -> Quad<Id<V::Iri, V::BlankId>, V::Iri, Object<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, GraphLabel<V::Iri, V::BlankId>>
source§impl<S, L> Quad<Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>>
impl<S, L> Quad<Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>, Term<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>>
pub fn inserted_into<V: VocabularyMut>( &self, vocabulary: &mut V ) -> Quad<Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>>where S: Clone, L: Clone,
pub fn insert_into<V: VocabularyMut>( self, vocabulary: &mut V ) -> Quad<Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>, Term<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>>
source§impl<S, P, O, G> Quad<S, P, O, G>
impl<S, P, O, G> Quad<S, P, O, G>
sourcepub fn subject(&self) -> &S
pub fn subject(&self) -> &S
Returns a reference to the subject of the quad, the first component.
sourcepub fn subject_mut(&mut self) -> &mut S
pub fn subject_mut(&mut self) -> &mut S
Returns a mutable reference to the subject of the quad, the first component.
sourcepub fn into_subject(self) -> S
pub fn into_subject(self) -> S
Turns the quad into its subject, the first component.
sourcepub fn predicate(&self) -> &P
pub fn predicate(&self) -> &P
Returns a reference to the predicate of the quad, the second component.
sourcepub fn predicate_mut(&mut self) -> &mut P
pub fn predicate_mut(&mut self) -> &mut P
Returns a mutable reference to the predicate of the quad, the second component.
sourcepub fn into_predicate(self) -> P
pub fn into_predicate(self) -> P
Turns the quad into its predicate, the second component.
sourcepub fn object_mut(&mut self) -> &mut O
pub fn object_mut(&mut self) -> &mut O
Returns a mutable reference to the object of the quad, the third component.
sourcepub fn into_object(self) -> O
pub fn into_object(self) -> O
Turns the quad into its object, the third component.
sourcepub fn graph(&self) -> Option<&G>
pub fn graph(&self) -> Option<&G>
Returns a reference to the graph of the quad, the fourth component.
sourcepub fn graph_mut(&mut self) -> Option<&mut G>
pub fn graph_mut(&mut self) -> Option<&mut G>
Returns a mutable reference to the graph of the quad, the fourth component.
sourcepub fn into_graph(self) -> Option<G>
pub fn into_graph(self) -> Option<G>
Turns the quad into its graph, the fourth component.
pub fn into_parts(self) -> (S, P, O, Option<G>)
sourcepub fn into_triple(self) -> (Triple<S, P, O>, Option<G>)
pub fn into_triple(self) -> (Triple<S, P, O>, Option<G>)
Turns this quad into a triple and its graph component.
sourcepub fn map_subject<U>(self, f: impl FnOnce(S) -> U) -> Quad<U, P, O, G>
pub fn map_subject<U>(self, f: impl FnOnce(S) -> U) -> Quad<U, P, O, G>
Maps the subject with the given function.
sourcepub fn map_predicate<U>(self, f: impl FnOnce(P) -> U) -> Quad<S, U, O, G>
pub fn map_predicate<U>(self, f: impl FnOnce(P) -> U) -> Quad<S, U, O, G>
Maps the subject with the given function.
sourcepub fn map_object<U>(self, f: impl FnOnce(O) -> U) -> Quad<S, P, U, G>
pub fn map_object<U>(self, f: impl FnOnce(O) -> U) -> Quad<S, P, U, G>
Maps the subject with the given function.
Trait Implementations§
source§impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay, G: RdfDisplay> Display for Quad<S, P, O, G>
impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay, G: RdfDisplay> Display for Quad<S, P, O, G>
source§impl<S: Ord, P: Ord, O: Ord, G: Ord> Ord for Quad<S, P, O, G>
impl<S: Ord, P: Ord, O: Ord, G: Ord> Ord for Quad<S, P, O, G>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<S1: PartialEq<S2>, P1: PartialEq<P2>, O1: PartialEq<O2>, G1: PartialEq<G2>, S2, P2, O2, G2> PartialEq<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
impl<S1: PartialEq<S2>, P1: PartialEq<P2>, O1: PartialEq<O2>, G1: PartialEq<G2>, S2, P2, O2, G2> PartialEq<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
source§impl<S1: PartialOrd<S2>, P1: PartialOrd<P2>, O1: PartialOrd<O2>, G1: PartialOrd<G2>, S2, P2, O2, G2> PartialOrd<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
impl<S1: PartialOrd<S2>, P1: PartialOrd<P2>, O1: PartialOrd<O2>, G1: PartialOrd<G2>, S2, P2, O2, G2> PartialOrd<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more