pub enum Term<I = IriBuf, B = BlankIdBuf, L = Literal<StringLiteral, I>> {
Blank(B),
Iri(I),
Literal(L),
}Expand description
gRDF term.
Either a blank node identifier, IRI or literal value.
Hash implementation
It is guaranteed that the Hash implementation of Term is transparent,
meaning that the hash of Term::Blank(id) the same as id, the hash of
Term::Iri(iri) is the same as iri and the hash of Term::Literal(l) is
the same as l.
Variants§
Implementations§
source§impl<I, B, L> Term<I, B, L>
impl<I, B, L> Term<I, B, L>
pub fn is_blank(&self) -> bool
pub fn is_iri(&self) -> bool
pub fn is_literal(&self) -> bool
pub fn as_blank(&self) -> Option<&B>
pub fn into_blank(self) -> Option<B>
pub fn as_iri(&self) -> Option<&I>
pub fn into_iri(self) -> Option<I>
pub fn as_literal(&self) -> Option<&L>
pub fn into_literal(self) -> Option<L>
source§impl Term
impl Term
pub fn as_term_ref(&self) -> TermRef<'_>
pub fn as_object_ref(&self) -> TermRef<'_>
source§impl<S, L> Term<IriBuf, BlankIdBuf, Literal<S, IriBuf, L>>
impl<S, L> Term<IriBuf, BlankIdBuf, Literal<S, IriBuf, L>>
pub fn inserted_into<V: VocabularyMut>( &self, vocabulary: &mut V ) -> Term<V::Iri, V::BlankId, Literal<S, V::Iri, L>>where S: Clone, L: Clone,
pub fn insert_into<V: VocabularyMut>( self, vocabulary: &mut V ) -> Term<V::Iri, V::BlankId, Literal<S, V::Iri, L>>
source§impl<'a> Term<Iri<'a>, &'a BlankId, &'a Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>
impl<'a> Term<Iri<'a>, &'a BlankId, &'a Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>
pub fn into_owned(self) -> Term
Trait Implementations§
source§impl<'a> From<&'a Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>> for TermRef<'a>
impl<'a> From<&'a Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>> for TermRef<'a>
source§impl<I: Ord, B: Ord, L: Ord> Ord for Term<I, B, L>
impl<I: Ord, B: Ord, L: Ord> Ord for Term<I, B, L>
1.21.0 · 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<I1: PartialEq<I2>, B1: PartialEq<B2>, L1: PartialEq<L2>, I2, B2, L2> PartialEq<Term<I2, B2, L2>> for Term<I1, B1, L1>
impl<I1: PartialEq<I2>, B1: PartialEq<B2>, L1: PartialEq<L2>, I2, B2, L2> PartialEq<Term<I2, B2, L2>> for Term<I1, B1, L1>
source§impl<I1: PartialOrd<I2>, B1: PartialOrd<B2>, L1: PartialOrd<L2>, I2, B2, L2> PartialOrd<Term<I2, B2, L2>> for Term<I1, B1, L1>
impl<I1: PartialOrd<I2>, B1: PartialOrd<B2>, L1: PartialOrd<L2>, I2, B2, L2> PartialOrd<Term<I2, B2, L2>> for Term<I1, B1, L1>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more