pub struct RdfTerm(/* private fields */);Expand description
Sophia wrapper for rdf_type types
Trait Implementations§
Source§impl From<Term<Id<Iri<Arc<str>>, ArcBnode>, Literal<Type<Iri<Arc<str>>, LanguageTag<Arc<str>>>>>> for RdfTerm
impl From<Term<Id<Iri<Arc<str>>, ArcBnode>, Literal<Type<Iri<Arc<str>>, LanguageTag<Arc<str>>>>>> for RdfTerm
Source§impl Term for RdfTerm
impl Term for RdfTerm
Source§type BorrowTerm<'x> = &'x RdfTerm
where
RdfTerm: 'x
type BorrowTerm<'x> = &'x RdfTerm where RdfTerm: 'x
A type of
Term that can be borrowed from this type
(i.e. that can be obtained from a simple reference to this type).
It is used in particular for accessing constituents of triple terms (Term::triple)
or for sharing this term with a function that expects T: Term (rather than &T)
using Term::borrow_term. Read moreSource§fn borrow_term(&self) -> <RdfTerm as Term>::BorrowTerm<'_>
fn borrow_term(&self) -> <RdfTerm as Term>::BorrowTerm<'_>
Source§fn bnode_id(&self) -> Option<BnodeId<MownStr<'_>>>
fn bnode_id(&self) -> Option<BnodeId<MownStr<'_>>>
If
kind returns TermKind::BlankNode,
return the locally unique label of this blank node.
Otherwise return None. Read moreSource§fn lexical_form(&self) -> Option<MownStr<'_>>
fn lexical_form(&self) -> Option<MownStr<'_>>
If
kind returns TermKind::Literal,
return the lexical form of this literal.
Otherwise return None. Read moreSource§fn datatype(&self) -> Option<IriRef<MownStr<'_>>>
fn datatype(&self) -> Option<IriRef<MownStr<'_>>>
If
kind returns TermKind::Literal,
return the datatype IRI of this literal.
Otherwise return None. Read moreSource§fn language_tag(&self) -> Option<LanguageTag<MownStr<'_>>>
fn language_tag(&self) -> Option<LanguageTag<MownStr<'_>>>
If
kind returns TermKind::Literal,
and if this literal is a [directional-]language-tagged string,
return its language tag.
Otherwise return None. Read moreSource§fn base_direction(&self) -> Option<BaseDirection>
fn base_direction(&self) -> Option<BaseDirection>
If
kind returns TermKind::Literal,
and if this literal is a directional-language-tagged string,
return its base direction.
Otherwise return None. Read moreSource§fn is_blank_node(&self) -> bool
fn is_blank_node(&self) -> bool
Source§fn is_literal(&self) -> bool
fn is_literal(&self) -> bool
Source§fn is_variable(&self) -> bool
fn is_variable(&self) -> bool
Source§fn variable(&self) -> Option<VarName<MownStr<'_>>>
fn variable(&self) -> Option<VarName<MownStr<'_>>>
If
kind returns TermKind::Variable,
return the name of this variable.
Otherwise return None. Read moreSource§fn to_triple(self) -> Option<[Self; 3]>where
Self: Sized,
fn to_triple(self) -> Option<[Self; 3]>where
Self: Sized,
If
kind returns TermKind::Triple,
return this triple, consuming this term.
Otherwise return None. Read moreSource§fn constituents<'s>(
&'s self,
) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>
fn constituents<'s>( &'s self, ) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>
Iter over all the constituents of this term. Read more
Source§fn to_constituents<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>where
Self: Clone + 'a,
fn to_constituents<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>where
Self: Clone + 'a,
Iter over all the constituents of this term, consuming it. Read more
Source§fn eq<T>(&self, other: T) -> boolwhere
T: Term,
fn eq<T>(&self, other: T) -> boolwhere
T: Term,
Check whether
self and other represent the same RDF term.Source§fn hash<H>(&self, state: &mut H)where
H: Hasher,
fn hash<H>(&self, state: &mut H)where
H: Hasher,
Compute an implementation-independent hash of this RDF term.
Source§fn try_into_term<T>(self) -> Result<T, <T as TryFromTerm>::Error>where
T: TryFromTerm,
Self: Sized,
fn try_into_term<T>(self) -> Result<T, <T as TryFromTerm>::Error>where
T: TryFromTerm,
Self: Sized,
Try to convert this term into another type. Read more
Source§fn as_simple(&self) -> SimpleTerm<'_>
fn as_simple(&self) -> SimpleTerm<'_>
Copies this term into a
SimpleTerm,
borrowing as much as possible from self
(calling SimpleTerm::from_term_ref).Auto Trait Implementations§
impl Freeze for RdfTerm
impl RefUnwindSafe for RdfTerm
impl Send for RdfTerm
impl Sync for RdfTerm
impl Unpin for RdfTerm
impl UnsafeUnpin for RdfTerm
impl UnwindSafe for RdfTerm
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more