pub struct Quad<S = Term, P = S, O = S, G = S>(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 Quad<Id, IriBuf, Term>
impl Quad<Id, IriBuf, Term>
pub fn as_lexical_quad_ref(&self) -> LexicalQuadRef<'_>
source§impl<'a> Quad<Id<&'a Iri, &'a BlankId>, &'a Iri, Term<Id<&'a Iri, &'a BlankId>, &'a Literal>>
impl<'a> Quad<Id<&'a Iri, &'a BlankId>, &'a Iri, Term<Id<&'a Iri, &'a BlankId>, &'a Literal>>
pub fn into_owned(self) -> LexicalQuad
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: EmbedIntoVocabulary<V>, P: EmbedIntoVocabulary<V>, O: EmbedIntoVocabulary<V>, G: EmbedIntoVocabulary<V>> EmbedIntoVocabulary<V> for Quad<S, P, O, G>
impl<V, S: EmbedIntoVocabulary<V>, P: EmbedIntoVocabulary<V>, O: EmbedIntoVocabulary<V>, G: EmbedIntoVocabulary<V>> EmbedIntoVocabulary<V> for Quad<S, P, O, G>
§type Embedded = Quad<<S as EmbedIntoVocabulary<V>>::Embedded, <P as EmbedIntoVocabulary<V>>::Embedded, <O as EmbedIntoVocabulary<V>>::Embedded, <G as EmbedIntoVocabulary<V>>::Embedded>
type Embedded = Quad<<S as EmbedIntoVocabulary<V>>::Embedded, <P as EmbedIntoVocabulary<V>>::Embedded, <O as EmbedIntoVocabulary<V>>::Embedded, <G as EmbedIntoVocabulary<V>>::Embedded>
fn embed_into_vocabulary(self, vocabulary: &mut V) -> Self::Embedded
source§impl<V, S: EmbeddedIntoVocabulary<V>, P: EmbeddedIntoVocabulary<V>, O: EmbeddedIntoVocabulary<V>, G: EmbeddedIntoVocabulary<V>> EmbeddedIntoVocabulary<V> for Quad<S, P, O, G>
impl<V, S: EmbeddedIntoVocabulary<V>, P: EmbeddedIntoVocabulary<V>, O: EmbeddedIntoVocabulary<V>, G: EmbeddedIntoVocabulary<V>> EmbeddedIntoVocabulary<V> for Quad<S, P, O, G>
type Embedded = Quad<<S as EmbeddedIntoVocabulary<V>>::Embedded, <P as EmbeddedIntoVocabulary<V>>::Embedded, <O as EmbeddedIntoVocabulary<V>>::Embedded, <G as EmbeddedIntoVocabulary<V>>::Embedded>
fn embedded_into_vocabulary(&self, vocabulary: &mut V) -> Self::Embedded
source§impl<R: Clone + Ord> Extend<Quad<R>> for BTreeDataset<R>
impl<R: Clone + Ord> Extend<Quad<R>> for BTreeDataset<R>
source§fn extend<T: IntoIterator<Item = Quad<R>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Quad<R>>>(&mut self, iter: T)
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl<R: Clone + Ord> Extend<Quad<R>> for IndexedBTreeDataset<R>
impl<R: Clone + Ord> Extend<Quad<R>> for IndexedBTreeDataset<R>
source§fn extend<T: IntoIterator<Item = Quad<R>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Quad<R>>>(&mut self, iter: T)
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl<V, S: ExtractFromVocabulary<V>, P: ExtractFromVocabulary<V>, O: ExtractFromVocabulary<V>, G: ExtractFromVocabulary<V>> ExtractFromVocabulary<V> for Quad<S, P, O, G>
impl<V, S: ExtractFromVocabulary<V>, P: ExtractFromVocabulary<V>, O: ExtractFromVocabulary<V>, G: ExtractFromVocabulary<V>> ExtractFromVocabulary<V> for Quad<S, P, O, G>
type Extracted = Quad<<S as ExtractFromVocabulary<V>>::Extracted, <P as ExtractFromVocabulary<V>>::Extracted, <O as ExtractFromVocabulary<V>>::Extracted, <G as ExtractFromVocabulary<V>>::Extracted>
fn extract_from_vocabulary(self, vocabulary: &V) -> Self::Extracted
source§impl<V, S: ExtractedFromVocabulary<V>, P: ExtractedFromVocabulary<V>, O: ExtractedFromVocabulary<V>, G: ExtractedFromVocabulary<V>> ExtractedFromVocabulary<V> for Quad<S, P, O, G>
impl<V, S: ExtractedFromVocabulary<V>, P: ExtractedFromVocabulary<V>, O: ExtractedFromVocabulary<V>, G: ExtractedFromVocabulary<V>> ExtractedFromVocabulary<V> for Quad<S, P, O, G>
type Extracted = Quad<<S as ExtractedFromVocabulary<V>>::Extracted, <P as ExtractedFromVocabulary<V>>::Extracted, <O as ExtractedFromVocabulary<V>>::Extracted, <G as ExtractedFromVocabulary<V>>::Extracted>
source§impl<T, X: PartialEq> From<Quad<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>
impl<T, X: PartialEq> From<Quad<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>
source§fn from(value: QuadPattern<T, X>) -> Self
fn from(value: QuadPattern<T, X>) -> Self
source§impl<T> From<Quad<T>> for CanonicalQuadPattern<T>
impl<T> From<Quad<T>> for CanonicalQuadPattern<T>
source§impl<R: Clone + Ord> FromIterator<Quad<R>> for BTreeDataset<R>
impl<R: Clone + Ord> FromIterator<Quad<R>> for BTreeDataset<R>
source§impl<R: Clone + Ord> FromIterator<Quad<R>> for IndexedBTreeDataset<R>
impl<R: Clone + Ord> FromIterator<Quad<R>> for IndexedBTreeDataset<R>
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: 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>
source§fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
source§fn rdf_display(&self) -> RdfDisplayed<&Self>
fn rdf_display(&self) -> RdfDisplayed<&Self>
source§impl<V, S: TryExtractFromVocabulary<V>, P: TryExtractFromVocabulary<V>, O: TryExtractFromVocabulary<V>, G: TryExtractFromVocabulary<V>> TryExtractFromVocabulary<V> for Quad<S, P, O, G>
impl<V, S: TryExtractFromVocabulary<V>, P: TryExtractFromVocabulary<V>, O: TryExtractFromVocabulary<V>, G: TryExtractFromVocabulary<V>> TryExtractFromVocabulary<V> for Quad<S, P, O, G>
type Extracted = Quad<<S as TryExtractFromVocabulary<V>>::Extracted, <P as TryExtractFromVocabulary<V>>::Extracted, <O as TryExtractFromVocabulary<V>>::Extracted, <G as TryExtractFromVocabulary<V>>::Extracted>
type Error = QuadExportFailed<<S as TryExtractFromVocabulary<V>>::Error, <P as TryExtractFromVocabulary<V>>::Error, <O as TryExtractFromVocabulary<V>>::Error, <G as TryExtractFromVocabulary<V>>::Error>
fn try_extract_from_vocabulary( self, vocabulary: &V ) -> Result<Self::Extracted, 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>
Auto Trait Implementations§
impl<S, P, O, G> Freeze for Quad<S, P, O, G>
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.