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: OImplementations§
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.
Trait Implementations§
Source§impl<S, P, O, V> DisplayWithContext<V> for Triple<S, P, O>
Available on crate feature contextual only.
impl<S, P, O, V> DisplayWithContext<V> for Triple<S, P, O>
contextual only.Source§impl<V, S, P, O> EmbedIntoVocabulary<V> for Triple<S, P, O>
impl<V, S, P, O> 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, ) -> <Triple<S, P, O> as EmbedIntoVocabulary<V>>::Embedded
Source§impl<V, S, P, O> EmbeddedIntoVocabulary<V> for Triple<S, P, O>
impl<V, S, P, O> 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, ) -> <Triple<S, P, O> as EmbeddedIntoVocabulary<V>>::Embedded
Source§impl<R> Extend<Triple<R>> for BTreeGraph<R>
impl<R> Extend<Triple<R>> for BTreeGraph<R>
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Triple<R>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Triple<R>>,
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> Extend<Triple<R>> for IndexedBTreeGraph<R>
impl<R> Extend<Triple<R>> for IndexedBTreeGraph<R>
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Triple<R>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Triple<R>>,
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, P, O> ExtractFromVocabulary<V> for Triple<S, P, O>
impl<V, S, P, O> 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, ) -> <Triple<S, P, O> as ExtractFromVocabulary<V>>::Extracted
Source§impl<V, S, P, O> ExtractedFromVocabulary<V> for Triple<S, P, O>
impl<V, S, P, O> 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§fn extracted_from_vocabulary(
&self,
vocabulary: &V,
) -> <Triple<S, P, O> as ExtractedFromVocabulary<V>>::Extracted
fn extracted_from_vocabulary( &self, vocabulary: &V, ) -> <Triple<S, P, O> as ExtractedFromVocabulary<V>>::Extracted
V. Read moreSource§impl<T, X> From<Triple<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>where
X: PartialEq,
impl<T, X> From<Triple<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>where
X: PartialEq,
Source§fn from(value: Triple<ResourceOrVar<T, X>>) -> CanonicalQuadPattern<T>
fn from(value: Triple<ResourceOrVar<T, X>>) -> CanonicalQuadPattern<T>
Source§impl<T, X> From<Triple<ResourceOrVar<T, X>>> for CanonicalTriplePattern<T>where
X: PartialEq,
impl<T, X> From<Triple<ResourceOrVar<T, X>>> for CanonicalTriplePattern<T>where
X: PartialEq,
Source§fn from(value: Triple<ResourceOrVar<T, X>>) -> CanonicalTriplePattern<T>
fn from(value: Triple<ResourceOrVar<T, X>>) -> CanonicalTriplePattern<T>
Source§impl<T> From<Triple<T>> for CanonicalQuadPattern<T>
impl<T> From<Triple<T>> for CanonicalQuadPattern<T>
Source§fn from(value: Triple<T>) -> CanonicalQuadPattern<T>
fn from(value: Triple<T>) -> CanonicalQuadPattern<T>
Source§impl<T> From<Triple<T>> for CanonicalTriplePattern<T>
impl<T> From<Triple<T>> for CanonicalTriplePattern<T>
Source§fn from(value: Triple<T>) -> CanonicalTriplePattern<T>
fn from(value: Triple<T>) -> CanonicalTriplePattern<T>
Source§impl<R> FromIterator<Triple<R>> for BTreeGraph<R>
impl<R> FromIterator<Triple<R>> for BTreeGraph<R>
Source§fn from_iter<T>(iter: T) -> BTreeGraph<R>where
T: IntoIterator<Item = Triple<R>>,
fn from_iter<T>(iter: T) -> BTreeGraph<R>where
T: IntoIterator<Item = Triple<R>>,
Source§impl<R> FromIterator<Triple<R>> for IndexedBTreeGraph<R>
impl<R> FromIterator<Triple<R>> for IndexedBTreeGraph<R>
Source§fn from_iter<T>(iter: T) -> IndexedBTreeGraph<R>where
T: IntoIterator<Item = Triple<R>>,
fn from_iter<T>(iter: T) -> IndexedBTreeGraph<R>where
T: IntoIterator<Item = Triple<R>>,
Source§impl<S, P, O> Ord for Triple<S, P, O>
impl<S, P, O> 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, P1, O1, S2, P2, O2> PartialOrd<Triple<S2, P2, O2>> for Triple<S1, P1, O1>
impl<S1, P1, O1, S2, P2, O2> PartialOrd<Triple<S2, P2, O2>> for Triple<S1, P1, O1>
Source§impl<S, P, O> RdfDisplay for Triple<S, P, O>
impl<S, P, O> RdfDisplay for Triple<S, P, O>
Source§impl<S, P, O, V> RdfDisplayWithContext<V> for Triple<S, P, O>
Available on crate feature contextual only.
impl<S, P, O, V> RdfDisplayWithContext<V> for Triple<S, P, O>
contextual only.impl<S, P, O> Copy for Triple<S, P, O>
impl<S, P, O> 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> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
impl<T> CallHasher for 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.