pub struct QuadPattern<T: Term> { /* private fields */ }Expand description
A quad statement pattern.
Implementations§
Source§impl<T: Term> QuadPattern<T>
impl<T: Term> QuadPattern<T>
pub const EMPTY: QuadPattern<T>
pub const fn empty() -> Self
pub const fn new(s: Option<T>, p: Option<T>, o: Option<T>, g: Option<T>) -> Self
pub const fn with_subject(s: T) -> Self
pub const fn with_predicate(p: T) -> Self
pub const fn with_object(o: T) -> Self
pub const fn with_context(g: T) -> Self
pub fn is_empty(&self) -> bool
pub fn is_constant(&self) -> bool
pub fn is_variable(&self) -> bool
pub fn into_inner(self) -> (Option<T>, Option<T>, Option<T>, Option<T>)
Source§impl<T: Term + Clone> QuadPattern<T>
impl<T: Term + Clone> QuadPattern<T>
pub fn to_triple_pattern(&self) -> TriplePattern<T>
Trait Implementations§
Source§impl Borrow<QuadPattern<CowTerm<'static>>> for AnyStatement
impl Borrow<QuadPattern<CowTerm<'static>>> for AnyStatement
Source§impl Borrow<QuadPattern<HeapTerm>> for AnyStatement
impl Borrow<QuadPattern<HeapTerm>> for AnyStatement
Source§impl<T: Clone + Term> Clone for QuadPattern<T>
impl<T: Clone + Term> Clone for QuadPattern<T>
Source§fn clone(&self) -> QuadPattern<T>
fn clone(&self) -> QuadPattern<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Term> Default for QuadPattern<T>
impl<T: Term> Default for QuadPattern<T>
Source§impl<'de, T> Deserialize<'de> for QuadPattern<T>where
T: Deserialize<'de> + Term,
impl<'de, T> Deserialize<'de> for QuadPattern<T>where
T: Deserialize<'de> + Term,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq + Term> Eq for QuadPattern<T>
Source§impl<T: Term + Clone> From<(Option<&T>, Option<&T>, Option<&T>, Option<&T>)> for QuadPattern<T>
impl<T: Term + Clone> From<(Option<&T>, Option<&T>, Option<&T>, Option<&T>)> for QuadPattern<T>
Source§impl<T: Term> From<(T, T, T, T)> for QuadPattern<T>
impl<T: Term> From<(T, T, T, T)> for QuadPattern<T>
Source§fn from((s, p, o, g): (T, T, T, T)) -> Self
fn from((s, p, o, g): (T, T, T, T)) -> Self
Converts to this type from the input type.
Source§impl<T: Term> FromIterator<T> for QuadPattern<T>
impl<T: Term> FromIterator<T> for QuadPattern<T>
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<T: Ord + Term> Ord for QuadPattern<T>
impl<T: Ord + Term> Ord for QuadPattern<T>
Source§fn cmp(&self, other: &QuadPattern<T>) -> Ordering
fn cmp(&self, other: &QuadPattern<T>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq + Term> PartialEq for QuadPattern<T>
impl<T: PartialEq + Term> PartialEq for QuadPattern<T>
Source§fn eq(&self, other: &QuadPattern<T>) -> bool
fn eq(&self, other: &QuadPattern<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T: PartialOrd + Term> PartialOrd for QuadPattern<T>
impl<T: PartialOrd + Term> PartialOrd for QuadPattern<T>
Source§impl<T> Serialize for QuadPattern<T>
impl<T> Serialize for QuadPattern<T>
Source§impl<T: Term + Clone> StatementPattern for QuadPattern<T>
impl<T: Term + Clone> StatementPattern for QuadPattern<T>
type Term = T
fn subject(&self) -> Option<&Self::Term>
fn predicate(&self) -> Option<&Self::Term>
fn object(&self) -> Option<&Self::Term>
fn context(&self) -> Option<&Self::Term>
fn matches( &self, subject: impl Term, predicate: impl Term, object: impl Term, context: Option<impl Term>, ) -> bool
Source§fn has_subject(&self) -> bool
fn has_subject(&self) -> bool
Whether the pattern has a constant subject.
Source§fn has_predicate(&self) -> bool
fn has_predicate(&self) -> bool
Whether the pattern has a constant predicate.
Source§fn has_object(&self) -> bool
fn has_object(&self) -> bool
Whether the pattern has a constant object.
Source§fn has_context(&self) -> bool
fn has_context(&self) -> bool
Whether the pattern has a constant context (graph).
fn to_triple_pattern(&self) -> TriplePattern<Self::Term>
fn to_quad_pattern(&self) -> QuadPattern<Self::Term>
impl<T: PartialEq + Term> StructuralPartialEq for QuadPattern<T>
Source§impl TryFrom<QuadPattern<CowTerm<'_>>> for AnyStatement
Available on crate feature alloc only.
impl TryFrom<QuadPattern<CowTerm<'_>>> for AnyStatement
Available on crate feature
alloc only.Source§impl TryFrom<QuadPattern<HeapTerm>> for AnyStatement
Available on crate feature alloc only.
impl TryFrom<QuadPattern<HeapTerm>> for AnyStatement
Available on crate feature
alloc only.Auto Trait Implementations§
impl<T> Freeze for QuadPattern<T>where
T: Freeze,
impl<T> RefUnwindSafe for QuadPattern<T>where
T: RefUnwindSafe,
impl<T> Send for QuadPattern<T>where
T: Send,
impl<T> Sync for QuadPattern<T>where
T: Sync,
impl<T> Unpin for QuadPattern<T>where
T: Unpin,
impl<T> UnsafeUnpin for QuadPattern<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for QuadPattern<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.