pub struct Triple<S = Id, P = IriBuf, O = Object>(pub S, pub P, pub O);
Expand description
RDF triple.
Tuple Fields§
§0: S
§1: P
§2: O
Implementations§
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<S, L> Triple<Id, IriBuf, Object<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>>
impl<S, L> Triple<Id, IriBuf, Object<Id<IriBuf, BlankIdBuf>, Literal<S, IriBuf, L>>>
pub fn inserted_into<V: VocabularyMut>( &self, vocabulary: &mut V ) -> Triple<Id<V::Iri, V::BlankId>, V::Iri, Object<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<Id<V::Iri, V::BlankId>, V::Iri, Object<Id<V::Iri, V::BlankId>, Literal<S, V::Iri, L>>>
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<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>
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