pub struct Triple<S = Term, P = S, O = S>(pub S, pub P, pub O);
Expand description
RDF triple.
Tuple Fields§
§0: S
§1: P
§2: O
Implementations§
Source§impl<I, B, L> Triple<Id<I, B>, I, Term<Id<I, B>, L>>
impl<I, B, L> Triple<Id<I, B>, I, Term<Id<I, B>, L>>
pub fn into_grdf(self) -> GrdfTriple<Id<I, B>, L>
Source§impl<S, P, O> Triple<S, P, O>
impl<S, P, O> Triple<S, P, O>
Sourcepub fn subject(&self) -> &S
pub fn subject(&self) -> &S
Returns a reference to the subject of the triple, 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 triple, the first component.
Sourcepub fn into_subject(self) -> S
pub fn into_subject(self) -> S
Turns the triple into its subject, the first component.
Sourcepub fn predicate(&self) -> &P
pub fn predicate(&self) -> &P
Returns a reference to the predicate of the triple, 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 triple, the second component.
Sourcepub fn into_predicate(self) -> P
pub fn into_predicate(self) -> P
Turns the triple into its predicate, the second component.
Sourcepub fn object(&self) -> &O
pub fn object(&self) -> &O
Returns a reference to the object of the triple, the third 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 triple, the third component.
Sourcepub fn into_object(self) -> O
pub fn into_object(self) -> O
Turns the triple into its object, the third component.
Sourcepub fn into_parts(self) -> (S, P, O)
pub fn into_parts(self) -> (S, P, O)
Turns the triple into a tuple
Sourcepub fn into_quad<G>(self, graph: Option<G>) -> Quad<S, P, O, G>
pub fn into_quad<G>(self, graph: Option<G>) -> Quad<S, P, O, G>
Turns the triple into a quad with the given graph
component.
Sourcepub fn map_subject<U>(self, f: impl FnOnce(S) -> U) -> Triple<U, P, O>
pub fn map_subject<U>(self, f: impl FnOnce(S) -> U) -> Triple<U, P, O>
Maps the subject with the given function.
Sourcepub fn map_predicate<U>(self, f: impl FnOnce(P) -> U) -> Triple<S, U, O>
pub fn map_predicate<U>(self, f: impl FnOnce(P) -> U) -> Triple<S, U, O>
Maps the subject with the given function.
Sourcepub fn map_object<U>(self, f: impl FnOnce(O) -> U) -> Triple<S, P, U>
pub fn map_object<U>(self, f: impl FnOnce(O) -> U) -> Triple<S, P, U>
Maps the subject with the given function.
Source§impl Triple<Id, IriBuf, Term>
impl Triple<Id, IriBuf, Term>
pub fn as_lexical_triple_ref(&self) -> LexicalTripleRef<'_>
Trait Implementations§
Source§impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay> Display for Triple<S, P, O>
impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay> Display for Triple<S, P, O>
Source§impl<V, S: EmbedIntoVocabulary<V>, P: EmbedIntoVocabulary<V>, O: EmbedIntoVocabulary<V>> EmbedIntoVocabulary<V> for Triple<S, P, O>
impl<V, S: EmbedIntoVocabulary<V>, P: EmbedIntoVocabulary<V>, O: EmbedIntoVocabulary<V>> EmbedIntoVocabulary<V> for Triple<S, P, O>
Source§type Embedded = Triple<<S as EmbedIntoVocabulary<V>>::Embedded, <P as EmbedIntoVocabulary<V>>::Embedded, <O as EmbedIntoVocabulary<V>>::Embedded>
type Embedded = Triple<<S as EmbedIntoVocabulary<V>>::Embedded, <P as EmbedIntoVocabulary<V>>::Embedded, <O 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>> EmbeddedIntoVocabulary<V> for Triple<S, P, O>
impl<V, S: EmbeddedIntoVocabulary<V>, P: EmbeddedIntoVocabulary<V>, O: EmbeddedIntoVocabulary<V>> EmbeddedIntoVocabulary<V> for Triple<S, P, O>
type Embedded = Triple<<S as EmbeddedIntoVocabulary<V>>::Embedded, <P as EmbeddedIntoVocabulary<V>>::Embedded, <O as EmbeddedIntoVocabulary<V>>::Embedded>
fn embedded_into_vocabulary(&self, vocabulary: &mut V) -> Self::Embedded
Source§impl<R: Clone + Ord> Extend<Triple<R>> for BTreeGraph<R>
impl<R: Clone + Ord> Extend<Triple<R>> for BTreeGraph<R>
Source§fn extend<T: IntoIterator<Item = Triple<R>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Triple<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<Triple<R>> for IndexedBTreeGraph<R>
impl<R: Clone + Ord> Extend<Triple<R>> for IndexedBTreeGraph<R>
Source§fn extend<T: IntoIterator<Item = Triple<R>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Triple<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>> ExtractFromVocabulary<V> for Triple<S, P, O>
impl<V, S: ExtractFromVocabulary<V>, P: ExtractFromVocabulary<V>, O: ExtractFromVocabulary<V>> ExtractFromVocabulary<V> for Triple<S, P, O>
type Extracted = Triple<<S as ExtractFromVocabulary<V>>::Extracted, <P as ExtractFromVocabulary<V>>::Extracted, <O 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>> ExtractedFromVocabulary<V> for Triple<S, P, O>
impl<V, S: ExtractedFromVocabulary<V>, P: ExtractedFromVocabulary<V>, O: ExtractedFromVocabulary<V>> ExtractedFromVocabulary<V> for Triple<S, P, O>
type Extracted = Triple<<S as ExtractedFromVocabulary<V>>::Extracted, <P as ExtractedFromVocabulary<V>>::Extracted, <O as ExtractedFromVocabulary<V>>::Extracted>
Source§impl<T, X: PartialEq> From<Triple<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>
impl<T, X: PartialEq> From<Triple<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>
Source§fn from(value: TriplePattern<T, X>) -> Self
fn from(value: TriplePattern<T, X>) -> Self
Source§impl<T, X: PartialEq> From<Triple<ResourceOrVar<T, X>>> for CanonicalTriplePattern<T>
impl<T, X: PartialEq> From<Triple<ResourceOrVar<T, X>>> for CanonicalTriplePattern<T>
Source§fn from(value: TriplePattern<T, X>) -> Self
fn from(value: TriplePattern<T, X>) -> Self
Source§impl<T> From<Triple<T>> for CanonicalQuadPattern<T>
impl<T> From<Triple<T>> for CanonicalQuadPattern<T>
Source§impl<T> From<Triple<T>> for CanonicalTriplePattern<T>
impl<T> From<Triple<T>> for CanonicalTriplePattern<T>
Source§impl<R: Clone + Ord> FromIterator<Triple<R>> for BTreeGraph<R>
impl<R: Clone + Ord> FromIterator<Triple<R>> for BTreeGraph<R>
Source§impl<R: Clone + Ord> FromIterator<Triple<R>> for IndexedBTreeGraph<R>
impl<R: Clone + Ord> FromIterator<Triple<R>> for IndexedBTreeGraph<R>
Source§impl<S: Ord, P: Ord, O: Ord> Ord for Triple<S, P, O>
impl<S: Ord, P: Ord, O: Ord> Ord for Triple<S, P, O>
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>, S2, P2, O2> PartialEq<Triple<S2, P2, O2>> for Triple<S1, P1, O1>
impl<S1: PartialEq<S2>, P1: PartialEq<P2>, O1: PartialEq<O2>, S2, P2, O2> PartialEq<Triple<S2, P2, O2>> for Triple<S1, P1, O1>
Source§impl<S1: PartialOrd<S2>, P1: PartialOrd<P2>, O1: PartialOrd<O2>, S2, P2, O2> PartialOrd<Triple<S2, P2, O2>> for Triple<S1, P1, O1>
impl<S1: PartialOrd<S2>, P1: PartialOrd<P2>, O1: PartialOrd<O2>, S2, P2, O2> PartialOrd<Triple<S2, P2, O2>> for Triple<S1, P1, O1>
Source§impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay> RdfDisplay for Triple<S, P, O>
impl<S: RdfDisplay, P: RdfDisplay, O: RdfDisplay> RdfDisplay for Triple<S, P, O>
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>
impl<S: Copy, P: Copy, O: Copy> Copy for Triple<S, P, O>
impl<S: Eq, P: Eq, O: Eq> Eq for Triple<S, P, O>
Auto Trait Implementations§
impl<S, P, O> Freeze for Triple<S, P, O>
impl<S, P, O> RefUnwindSafe for Triple<S, P, O>
impl<S, P, O> Send for Triple<S, P, O>
impl<S, P, O> Sync for Triple<S, P, O>
impl<S, P, O> Unpin for Triple<S, P, O>
impl<S, P, O> UnwindSafe for Triple<S, P, O>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.