Skip to main content

QuadPattern

Struct QuadPattern 

Source
pub struct QuadPattern<T: Term> { /* private fields */ }
Expand description

A quad statement pattern.

Implementations§

Source§

impl<T: Term> QuadPattern<T>

Source

pub const EMPTY: QuadPattern<T>

Source

pub const fn empty() -> Self

Source

pub const fn new(s: Option<T>, p: Option<T>, o: Option<T>, g: Option<T>) -> Self

Source

pub const fn with_subject(s: T) -> Self

Source

pub const fn with_predicate(p: T) -> Self

Source

pub const fn with_object(o: T) -> Self

Source

pub const fn with_context(g: T) -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn is_constant(&self) -> bool

Source

pub fn is_variable(&self) -> bool

Source

pub fn into_inner(self) -> (Option<T>, Option<T>, Option<T>, Option<T>)

Source§

impl<T: Term + Clone> QuadPattern<T>

Trait Implementations§

Source§

impl Borrow<QuadPattern<CowTerm<'static>>> for AnyStatement

Source§

fn borrow(&self) -> &QuadPattern<CowTerm<'static>>

Immutably borrows from an owned value. Read more
Source§

impl Borrow<QuadPattern<HeapTerm>> for AnyStatement

Source§

fn borrow(&self) -> &QuadPattern<HeapTerm>

Immutably borrows from an owned value. Read more
Source§

impl<T: Clone + Term> Clone for QuadPattern<T>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + Term> Debug for QuadPattern<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Term> Default for QuadPattern<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

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>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: Eq + Term> Eq for QuadPattern<T>

Source§

impl<T: Term + Clone> From<(&T, &T, &T)> for QuadPattern<T>

Source§

fn from((s, p, o): (&T, &T, &T)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term + Clone> From<(&T, &T, &T, &T)> for QuadPattern<T>

Source§

fn from((s, p, o, g): (&T, &T, &T, &T)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term> From<()> for QuadPattern<T>

Source§

fn from(_: ()) -> Self

Converts to this type from the input type.
Source§

impl<T: Term + Clone> From<(Option<&T>, Option<&T>, Option<&T>)> for QuadPattern<T>

Source§

fn from((s, p, o): (Option<&T>, Option<&T>, Option<&T>)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term + Clone> From<(Option<&T>, Option<&T>, Option<&T>, Option<&T>)> for QuadPattern<T>

Source§

fn from((s, p, o, g): (Option<&T>, Option<&T>, Option<&T>, Option<&T>)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term> From<(Option<T>, Option<T>, Option<T>)> for QuadPattern<T>

Source§

fn from((s, p, o): (Option<T>, Option<T>, Option<T>)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term> From<(Option<T>, Option<T>, Option<T>, Option<T>)> for QuadPattern<T>

Source§

fn from((s, p, o, g): (Option<T>, Option<T>, Option<T>, Option<T>)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term> From<(T, T, T)> for QuadPattern<T>

Source§

fn from((s, p, o): (T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term> From<(T, T, T, T)> for QuadPattern<T>

Source§

fn from((s, p, o, g): (T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T: Term> From<Option<()>> for QuadPattern<T>

Source§

fn from(_: Option<()>) -> Self

Converts to this type from the input type.
Source§

impl<T: Term> FromIterator<T> for QuadPattern<T>

Source§

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl<T: Hash + Term> Hash for QuadPattern<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: Ord + Term> Ord for QuadPattern<T>

Source§

fn cmp(&self, other: &QuadPattern<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: PartialEq + Term> PartialEq for QuadPattern<T>

Source§

fn eq(&self, other: &QuadPattern<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialOrd + Term> PartialOrd for QuadPattern<T>

Source§

fn partial_cmp(&self, other: &QuadPattern<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Serialize for QuadPattern<T>
where T: Serialize + Term,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: Term + Clone> StatementPattern for QuadPattern<T>

Source§

type Term = T

Source§

fn subject(&self) -> Option<&Self::Term>

Source§

fn predicate(&self) -> Option<&Self::Term>

Source§

fn object(&self) -> Option<&Self::Term>

Source§

fn context(&self) -> Option<&Self::Term>

Source§

fn matches( &self, subject: impl Term, predicate: impl Term, object: impl Term, context: Option<impl Term>, ) -> bool

Source§

fn has_subject(&self) -> bool

Whether the pattern has a constant subject.
Source§

fn has_predicate(&self) -> bool

Whether the pattern has a constant predicate.
Source§

fn has_object(&self) -> bool

Whether the pattern has a constant object.
Source§

fn has_context(&self) -> bool

Whether the pattern has a constant context (graph).
Source§

fn to_triple_pattern(&self) -> TriplePattern<Self::Term>

Source§

fn to_quad_pattern(&self) -> QuadPattern<Self::Term>

Source§

impl<T: PartialEq + Term> StructuralPartialEq for QuadPattern<T>

Source§

impl TryFrom<QuadPattern<CowTerm<'_>>> for AnyStatement

Available on crate feature alloc only.
Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(input: CowQuadPattern<'_>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<QuadPattern<HeapTerm>> for AnyStatement

Available on crate feature alloc only.
Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(input: HeapQuadPattern) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: Term> TryFrom<QuadPattern<T>> for Quad<T>

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(input: QuadPattern<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: Term> TryFrom<QuadPattern<T>> for Triple<T>

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(input: QuadPattern<T>) -> Result<Self, Self::Error>

Performs the conversion.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V