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<S, P, O, G> Quad<S, P, O, G>
impl<S, P, O, G> Quad<S, P, O, G>
Sourcepub fn new(
subject: S,
predicate: P,
object: O,
graph: Option<G>,
) -> Quad<S, P, O, G>
pub fn new( subject: S, predicate: P, object: O, graph: Option<G>, ) -> Quad<S, P, O, G>
Creates a new quad.
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<'a> BlankNodeComponents<'a> for Quad<Id<&'a Iri, &'a BlankId>, &'a Iri, Term<Id<&'a Iri, &'a BlankId>, &'a Literal>>
impl<'a> BlankNodeComponents<'a> for Quad<Id<&'a Iri, &'a BlankId>, &'a Iri, Term<Id<&'a Iri, &'a BlankId>, &'a Literal>>
fn blank_node_components(&self) -> Vec<&'a BlankId>
fn blank_node_components_with_position( &self, ) -> Vec<(&'a BlankId, BlankIdPosition)>
Source§impl BlankNodeComponentsMut for Quad<Id, IriBuf, Term>
impl BlankNodeComponentsMut for Quad<Id, IriBuf, Term>
fn blank_node_components_mut(&mut self) -> Vec<&mut BlankIdBuf>
Source§impl<S, P, O, G, V> DisplayWithContext<V> for Quad<S, P, O, G>where
S: RdfDisplayWithContext<V>,
P: RdfDisplayWithContext<V>,
O: RdfDisplayWithContext<V>,
G: RdfDisplayWithContext<V>,
Available on crate feature contextual only.
impl<S, P, O, G, V> DisplayWithContext<V> for Quad<S, P, O, G>where
S: RdfDisplayWithContext<V>,
P: RdfDisplayWithContext<V>,
O: RdfDisplayWithContext<V>,
G: RdfDisplayWithContext<V>,
contextual only.Source§impl<V, S, P, O, G> EmbedIntoVocabulary<V> for Quad<S, P, O, G>where
S: EmbedIntoVocabulary<V>,
P: EmbedIntoVocabulary<V>,
O: EmbedIntoVocabulary<V>,
G: EmbedIntoVocabulary<V>,
impl<V, S, P, O, G> EmbedIntoVocabulary<V> for Quad<S, P, O, G>where
S: EmbedIntoVocabulary<V>,
P: EmbedIntoVocabulary<V>,
O: EmbedIntoVocabulary<V>,
G: EmbedIntoVocabulary<V>,
Source§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, ) -> <Quad<S, P, O, G> as EmbedIntoVocabulary<V>>::Embedded
Source§impl<V, S, P, O, G> EmbeddedIntoVocabulary<V> for Quad<S, P, O, G>where
S: EmbeddedIntoVocabulary<V>,
P: EmbeddedIntoVocabulary<V>,
O: EmbeddedIntoVocabulary<V>,
G: EmbeddedIntoVocabulary<V>,
impl<V, S, P, O, G> EmbeddedIntoVocabulary<V> for Quad<S, P, O, G>where
S: EmbeddedIntoVocabulary<V>,
P: EmbeddedIntoVocabulary<V>,
O: EmbeddedIntoVocabulary<V>,
G: EmbeddedIntoVocabulary<V>,
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, ) -> <Quad<S, P, O, G> as EmbeddedIntoVocabulary<V>>::Embedded
Source§impl<R> Extend<Quad<R>> for BTreeDataset<R>
impl<R> Extend<Quad<R>> for BTreeDataset<R>
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Quad<R>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Quad<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<Quad<R>> for IndexedBTreeDataset<R>
impl<R> Extend<Quad<R>> for IndexedBTreeDataset<R>
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Quad<R>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Quad<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, G> ExtractFromVocabulary<V> for Quad<S, P, O, G>where
S: ExtractFromVocabulary<V>,
P: ExtractFromVocabulary<V>,
O: ExtractFromVocabulary<V>,
G: ExtractFromVocabulary<V>,
impl<V, S, P, O, G> ExtractFromVocabulary<V> for Quad<S, P, O, G>where
S: ExtractFromVocabulary<V>,
P: ExtractFromVocabulary<V>,
O: ExtractFromVocabulary<V>,
G: ExtractFromVocabulary<V>,
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, ) -> <Quad<S, P, O, G> as ExtractFromVocabulary<V>>::Extracted
Source§impl<V, S, P, O, G> ExtractedFromVocabulary<V> for Quad<S, P, O, G>where
S: ExtractedFromVocabulary<V>,
P: ExtractedFromVocabulary<V>,
O: ExtractedFromVocabulary<V>,
G: ExtractedFromVocabulary<V>,
impl<V, S, P, O, G> ExtractedFromVocabulary<V> for Quad<S, P, O, G>where
S: ExtractedFromVocabulary<V>,
P: ExtractedFromVocabulary<V>,
O: ExtractedFromVocabulary<V>,
G: ExtractedFromVocabulary<V>,
type Extracted = Quad<<S as ExtractedFromVocabulary<V>>::Extracted, <P as ExtractedFromVocabulary<V>>::Extracted, <O as ExtractedFromVocabulary<V>>::Extracted, <G as ExtractedFromVocabulary<V>>::Extracted>
Source§fn extracted_from_vocabulary(
&self,
vocabulary: &V,
) -> <Quad<S, P, O, G> as ExtractedFromVocabulary<V>>::Extracted
fn extracted_from_vocabulary( &self, vocabulary: &V, ) -> <Quad<S, P, O, G> as ExtractedFromVocabulary<V>>::Extracted
V. Read moreSource§impl<T, X> From<Quad<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>where
X: PartialEq,
impl<T, X> From<Quad<ResourceOrVar<T, X>>> for CanonicalQuadPattern<T>where
X: PartialEq,
Source§fn from(value: Quad<ResourceOrVar<T, X>>) -> CanonicalQuadPattern<T>
fn from(value: Quad<ResourceOrVar<T, X>>) -> CanonicalQuadPattern<T>
Source§impl<T> From<Quad<T>> for CanonicalQuadPattern<T>
impl<T> From<Quad<T>> for CanonicalQuadPattern<T>
Source§fn from(value: Quad<T>) -> CanonicalQuadPattern<T>
fn from(value: Quad<T>) -> CanonicalQuadPattern<T>
Source§impl<R> FromIterator<Quad<R>> for BTreeDataset<R>
impl<R> FromIterator<Quad<R>> for BTreeDataset<R>
Source§fn from_iter<T>(iter: T) -> BTreeDataset<R>where
T: IntoIterator<Item = Quad<R>>,
fn from_iter<T>(iter: T) -> BTreeDataset<R>where
T: IntoIterator<Item = Quad<R>>,
Source§impl<R> FromIterator<Quad<R>> for IndexedBTreeDataset<R>
impl<R> FromIterator<Quad<R>> for IndexedBTreeDataset<R>
Source§fn from_iter<T>(iter: T) -> IndexedBTreeDataset<R>where
T: IntoIterator<Item = Quad<R>>,
fn from_iter<T>(iter: T) -> IndexedBTreeDataset<R>where
T: IntoIterator<Item = Quad<R>>,
Source§impl<S, P, O, G, I> Interpret<I> for Quad<S, P, O, G>
impl<S, P, O, G, I> Interpret<I> for Quad<S, P, O, G>
Source§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§impl<S, P, O, G> Ord for Quad<S, P, O, G>
impl<S, P, O, G> 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, P1, O1, G1, S2, P2, O2, G2> PartialEq<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
impl<S1, P1, O1, G1, S2, P2, O2, G2> PartialEq<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
Source§impl<S1, P1, O1, G1, S2, P2, O2, G2> PartialOrd<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
impl<S1, P1, O1, G1, S2, P2, O2, G2> PartialOrd<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>
Source§impl<S, P, O, G> RdfDisplay for Quad<S, P, O, G>
impl<S, P, O, G> RdfDisplay for Quad<S, P, O, G>
Source§impl<S, P, O, G, V> RdfDisplayWithContext<V> for Quad<S, P, O, G>where
S: RdfDisplayWithContext<V>,
P: RdfDisplayWithContext<V>,
O: RdfDisplayWithContext<V>,
G: RdfDisplayWithContext<V>,
Available on crate feature contextual only.
impl<S, P, O, G, V> RdfDisplayWithContext<V> for Quad<S, P, O, G>where
S: RdfDisplayWithContext<V>,
P: RdfDisplayWithContext<V>,
O: RdfDisplayWithContext<V>,
G: RdfDisplayWithContext<V>,
contextual only.Source§impl<V, S, P, O, G> TryExtractFromVocabulary<V> for Quad<S, P, O, G>where
S: TryExtractFromVocabulary<V>,
P: TryExtractFromVocabulary<V>,
O: TryExtractFromVocabulary<V>,
G: TryExtractFromVocabulary<V>,
impl<V, S, P, O, G> TryExtractFromVocabulary<V> for Quad<S, P, O, G>where
S: TryExtractFromVocabulary<V>,
P: TryExtractFromVocabulary<V>,
O: TryExtractFromVocabulary<V>,
G: TryExtractFromVocabulary<V>,
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<<Quad<S, P, O, G> as TryExtractFromVocabulary<V>>::Extracted, <Quad<S, P, O, G> as TryExtractFromVocabulary<V>>::Error>
impl<S, P, O, G> Copy for Quad<S, P, O, G>
impl<S, P, O, G> 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<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.