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<L> Quad<Id, IriBuf, Object<Id, L>, GraphLabel>
impl<L> Quad<Id, IriBuf, Object<Id, L>, GraphLabel>
pub fn as_quad_ref(&self) -> QuadRef<'_, L>
source§impl<'a, L> Quad<Id<&'a Iri, &'a BlankId>, &'a Iri, Term<Id<&'a Iri, &'a BlankId>, &'a L>, Id<&'a Iri, &'a BlankId>>
impl<'a, L> Quad<Id<&'a Iri, &'a BlankId>, &'a Iri, Term<Id<&'a Iri, &'a BlankId>, &'a L>, Id<&'a Iri, &'a BlankId>>
pub fn into_owned(self) -> Quad<Id, IriBuf, Object<Id, L>, GraphLabel>where
L: Clone,
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<V, S: ExportFromVocabulary<V>, P: ExportFromVocabulary<V>, O: ExportFromVocabulary<V>, G: ExportFromVocabulary<V>> ExportFromVocabulary<V> for Quad<S, P, O, G>
impl<V, S: ExportFromVocabulary<V>, P: ExportFromVocabulary<V>, O: ExportFromVocabulary<V>, G: ExportFromVocabulary<V>> ExportFromVocabulary<V> for Quad<S, P, O, G>
type Output = Quad<<S as ExportFromVocabulary<V>>::Output, <P as ExportFromVocabulary<V>>::Output, <O as ExportFromVocabulary<V>>::Output, <G as ExportFromVocabulary<V>>::Output>
fn export_from_vocabulary(self, vocabulary: &V) -> Self::Output
source§impl<V, S: ExportRefFromVocabulary<V>, P: ExportRefFromVocabulary<V>, O: ExportRefFromVocabulary<V>, G: ExportRefFromVocabulary<V>> ExportRefFromVocabulary<V> for Quad<S, P, O, G>
impl<V, S: ExportRefFromVocabulary<V>, P: ExportRefFromVocabulary<V>, O: ExportRefFromVocabulary<V>, G: ExportRefFromVocabulary<V>> ExportRefFromVocabulary<V> for Quad<S, P, O, G>
type Output = Quad<<S as ExportRefFromVocabulary<V>>::Output, <P as ExportRefFromVocabulary<V>>::Output, <O as ExportRefFromVocabulary<V>>::Output, <G as ExportRefFromVocabulary<V>>::Output>
fn export_ref_from_vocabulary(self, vocabulary: &V) -> Self::Output
source§impl<V, S: ExportedFromVocabulary<V>, P: ExportedFromVocabulary<V>, O: ExportedFromVocabulary<V>, G: ExportedFromVocabulary<V>> ExportedFromVocabulary<V> for Quad<S, P, O, G>
impl<V, S: ExportedFromVocabulary<V>, P: ExportedFromVocabulary<V>, O: ExportedFromVocabulary<V>, G: ExportedFromVocabulary<V>> ExportedFromVocabulary<V> for Quad<S, P, O, G>
type Output = Quad<<S as ExportedFromVocabulary<V>>::Output, <P as ExportedFromVocabulary<V>>::Output, <O as ExportedFromVocabulary<V>>::Output, <G as ExportedFromVocabulary<V>>::Output>
source§impl<V, S: InsertIntoVocabulary<V>, P: InsertIntoVocabulary<V>, O: InsertIntoVocabulary<V>, G: InsertIntoVocabulary<V>> InsertIntoVocabulary<V> for Quad<S, P, O, G>
impl<V, S: InsertIntoVocabulary<V>, P: InsertIntoVocabulary<V>, O: InsertIntoVocabulary<V>, G: InsertIntoVocabulary<V>> InsertIntoVocabulary<V> for Quad<S, P, O, G>
type Inserted = Quad<<S as InsertIntoVocabulary<V>>::Inserted, <P as InsertIntoVocabulary<V>>::Inserted, <O as InsertIntoVocabulary<V>>::Inserted, <G as InsertIntoVocabulary<V>>::Inserted>
fn insert_into_vocabulary(self, vocabulary: &mut V) -> Self::Inserted
source§impl<V, S: InsertedIntoVocabulary<V>, P: InsertedIntoVocabulary<V>, O: InsertedIntoVocabulary<V>, G: InsertedIntoVocabulary<V>> InsertedIntoVocabulary<V> for Quad<S, P, O, G>
impl<V, S: InsertedIntoVocabulary<V>, P: InsertedIntoVocabulary<V>, O: InsertedIntoVocabulary<V>, G: InsertedIntoVocabulary<V>> InsertedIntoVocabulary<V> for Quad<S, P, O, G>
type Inserted = Quad<<S as InsertedIntoVocabulary<V>>::Inserted, <P as InsertedIntoVocabulary<V>>::Inserted, <O as InsertedIntoVocabulary<V>>::Inserted, <G as InsertedIntoVocabulary<V>>::Inserted>
fn inserted_into_vocabulary(&self, vocabulary: &mut V) -> Self::Inserted
source§impl<S: Interpret<I>, P: Interpret<I>, O: Interpret<I>, G: Interpret<I>, I: Interpretation> Interpret<I> for Quad<S, P, O, G>
impl<S: Interpret<I>, P: Interpret<I>, O: Interpret<I>, G: Interpret<I>, I: Interpretation> Interpret<I> for Quad<S, P, O, G>
§type Interpreted = Quad<<S as Interpret<I>>::Interpreted, <P as Interpret<I>>::Interpreted, <O as Interpret<I>>::Interpreted, <G as Interpret<I>>::Interpreted>
type Interpreted = Quad<<S as Interpret<I>>::Interpreted, <P as Interpret<I>>::Interpreted, <O as Interpret<I>>::Interpreted, <G as Interpret<I>>::Interpreted>
source§fn interpret(self, interpretation: &mut I) -> Self::Interpreted
fn interpret(self, interpretation: &mut I) -> Self::Interpreted
source§impl<S: MapLiteral<T, U>, P: MapLiteral<T, U>, O: MapLiteral<T, U>, G: MapLiteral<T, U>, T, U> MapLiteral<T, U> for Quad<S, P, O, G>
impl<S: MapLiteral<T, U>, P: MapLiteral<T, U>, O: MapLiteral<T, U>, G: MapLiteral<T, U>, T, U> MapLiteral<T, U> for Quad<S, P, O, G>
type Output = Quad<<S as MapLiteral<T, U>>::Output, <P as MapLiteral<T, U>>::Output, <O as MapLiteral<T, U>>::Output, <G as MapLiteral<T, U>>::Output>
source§fn map_literal(self, f: impl FnMut(T) -> U) -> Self::Output
fn map_literal(self, f: impl FnMut(T) -> U) -> Self::Output
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 moresource§impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay, G: RdfDisplay> RdfDisplay for Quad<S, P, O, G>
impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay, G: RdfDisplay> RdfDisplay for Quad<S, P, O, G>
fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
fn rdf_display(&self) -> RdfDisplayed<&Self>
source§impl<V, S: TryExportFromVocabulary<V>, P: TryExportFromVocabulary<V>, O: TryExportFromVocabulary<V>, G: TryExportFromVocabulary<V>> TryExportFromVocabulary<V> for Quad<S, P, O, G>
impl<V, S: TryExportFromVocabulary<V>, P: TryExportFromVocabulary<V>, O: TryExportFromVocabulary<V>, G: TryExportFromVocabulary<V>> TryExportFromVocabulary<V> for Quad<S, P, O, G>
type Output = Quad<<S as TryExportFromVocabulary<V>>::Output, <P as TryExportFromVocabulary<V>>::Output, <O as TryExportFromVocabulary<V>>::Output, <G as TryExportFromVocabulary<V>>::Output>
type Error = QuadExportFailed<<S as TryExportFromVocabulary<V>>::Error, <P as TryExportFromVocabulary<V>>::Error, <O as TryExportFromVocabulary<V>>::Error, <G as TryExportFromVocabulary<V>>::Error>
fn try_export_from_vocabulary( self, vocabulary: &V ) -> Result<Self::Output, Self::Error>
impl<S: Copy, P: Copy, O: Copy, G: Copy> Copy for Quad<S, P, O, G>
impl<S: Eq, P: Eq, O: Eq, G: Eq> Eq for Quad<S, P, O, G>
impl<S, P, O, G> StructuralEq for Quad<S, P, O, G>
Auto Trait Implementations§
impl<S, P, O, G> RefUnwindSafe for Quad<S, P, O, G>
impl<S, P, O, G> Send for Quad<S, P, O, G>
impl<S, P, O, G> Sync for Quad<S, P, O, G>
impl<S, P, O, G> Unpin for Quad<S, P, O, G>
impl<S, P, O, G> UnwindSafe for Quad<S, P, O, G>
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.