pub enum GroundTermRef<'a> {
Iri(&'a Iri),
Literal(LiteralRef<'a>),
}Expand description
Ground term reference.
Variants§
Implementations§
Source§impl<'a> GroundTermRef<'a>
impl<'a> GroundTermRef<'a>
Sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Checks if this is a literal.
Sourcepub fn as_literal(&self) -> Option<LiteralRef<'a>>
pub fn as_literal(&self) -> Option<LiteralRef<'a>>
Returns this ground term as a literal, if it is one.
Sourcepub fn into_cow(self) -> CowGroundTerm<'a>
pub fn into_cow(self) -> CowGroundTerm<'a>
Turns this ground term reference into a copy-on-write ground term.
Source§impl GroundTermRef<'_>
impl GroundTermRef<'_>
Sourcepub fn to_owned(&self) -> GroundTerm
pub fn to_owned(&self) -> GroundTerm
Clones the referenced ground term.
Trait Implementations§
Source§impl<'a> Clone for GroundTermRef<'a>
impl<'a> Clone for GroundTermRef<'a>
Source§fn clone(&self) -> GroundTermRef<'a>
fn clone(&self) -> GroundTermRef<'a>
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 Comparable<GroundTerm> for GroundTermRef<'_>
impl Comparable<GroundTerm> for GroundTermRef<'_>
Source§fn compare(&self, key: &GroundTerm) -> Ordering
fn compare(&self, key: &GroundTerm) -> Ordering
Compare self to
key and return their ordering.impl<'a> Copy for GroundTermRef<'a>
Source§impl<'a> Debug for GroundTermRef<'a>
impl<'a> Debug for GroundTermRef<'a>
Source§impl Display for GroundTermRef<'_>
impl Display for GroundTermRef<'_>
impl<'a> Eq for GroundTermRef<'a>
Source§impl Equivalent<GroundTerm> for GroundTermRef<'_>
impl Equivalent<GroundTerm> for GroundTermRef<'_>
Source§fn equivalent(&self, key: &GroundTerm) -> bool
fn equivalent(&self, key: &GroundTerm) -> bool
Compare self to
key and return true if they are equal.Source§impl From<GroundTermRef<'_>> for GroundTerm
impl From<GroundTermRef<'_>> for GroundTerm
Source§fn from(value: GroundTermRef<'_>) -> Self
fn from(value: GroundTermRef<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<GroundTermRef<'a>> for CowGroundTerm<'a>
impl<'a> From<GroundTermRef<'a>> for CowGroundTerm<'a>
Source§fn from(value: GroundTermRef<'a>) -> Self
fn from(value: GroundTermRef<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for GroundTermRef<'a>
impl<'a> Hash for GroundTermRef<'a>
Source§impl IntoOwned for GroundTermRef<'_>
impl IntoOwned for GroundTermRef<'_>
Source§type Owned = GroundTerm
type Owned = GroundTerm
The fully owned type produced by
into_owned.Source§fn into_owned(self) -> GroundTerm
fn into_owned(self) -> GroundTerm
Converts
self into a fully owned value, consuming it. Read moreSource§impl<'a> Ord for GroundTermRef<'a>
impl<'a> Ord for GroundTermRef<'a>
Source§fn cmp(&self, other: &GroundTermRef<'a>) -> Ordering
fn cmp(&self, other: &GroundTermRef<'a>) -> 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<'a> PartialEq for GroundTermRef<'a>
impl<'a> PartialEq for GroundTermRef<'a>
Source§fn eq(&self, other: &GroundTermRef<'a>) -> bool
fn eq(&self, other: &GroundTermRef<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<CowGroundTerm<'_>> for GroundTermRef<'_>
impl PartialEq<CowGroundTerm<'_>> for GroundTermRef<'_>
Source§fn eq(&self, other: &CowGroundTerm<'_>) -> bool
fn eq(&self, other: &CowGroundTerm<'_>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<GroundTerm> for GroundTermRef<'_>
impl PartialEq<GroundTerm> for GroundTermRef<'_>
Source§fn eq(&self, other: &GroundTerm) -> bool
fn eq(&self, other: &GroundTerm) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a> PartialEq<GroundTermRef<'a>> for CowGroundTerm<'_>
impl<'a> PartialEq<GroundTermRef<'a>> for CowGroundTerm<'_>
Source§fn eq(&self, other: &GroundTermRef<'a>) -> bool
fn eq(&self, other: &GroundTermRef<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a> PartialEq<GroundTermRef<'a>> for GroundTerm
impl<'a> PartialEq<GroundTermRef<'a>> for GroundTerm
Source§fn eq(&self, other: &GroundTermRef<'a>) -> bool
fn eq(&self, other: &GroundTermRef<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a> PartialOrd for GroundTermRef<'a>
impl<'a> PartialOrd for GroundTermRef<'a>
Source§impl PartialOrd<CowGroundTerm<'_>> for GroundTermRef<'_>
impl PartialOrd<CowGroundTerm<'_>> for GroundTermRef<'_>
Source§impl PartialOrd<GroundTerm> for GroundTermRef<'_>
impl PartialOrd<GroundTerm> for GroundTermRef<'_>
Source§impl<'a> PartialOrd<GroundTermRef<'a>> for CowGroundTerm<'_>
impl<'a> PartialOrd<GroundTermRef<'a>> for CowGroundTerm<'_>
Source§impl<'a> PartialOrd<GroundTermRef<'a>> for GroundTerm
impl<'a> PartialOrd<GroundTermRef<'a>> for GroundTerm
Source§impl RdfDisplay for GroundTermRef<'_>
impl RdfDisplay for GroundTermRef<'_>
Source§fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter.
Source§fn rdf_display(&self) -> RdfDisplayed<&Self>
fn rdf_display(&self) -> RdfDisplayed<&Self>
Prepare the value to be formatted as an RDF syntax element.
impl<'a> StructuralPartialEq for GroundTermRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for GroundTermRef<'a>
impl<'a> RefUnwindSafe for GroundTermRef<'a>
impl<'a> Send for GroundTermRef<'a>
impl<'a> Sync for GroundTermRef<'a>
impl<'a> Unpin for GroundTermRef<'a>
impl<'a> UnsafeUnpin for GroundTermRef<'a>
impl<'a> UnwindSafe for GroundTermRef<'a>
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.