pub struct Trusted<T>(pub T);
Expand description
A wrapper for Rio types that are trusted to contain valid data
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<'a> Quad for Trusted<GeneralizedQuad<'a>>
impl<'a> Quad for Trusted<GeneralizedQuad<'a>>
Source§fn s(&self) -> QBorrowTerm<'_, Self>
fn s(&self) -> QBorrowTerm<'_, Self>
The subject of this quad.
Source§fn p(&self) -> QBorrowTerm<'_, Self>
fn p(&self) -> QBorrowTerm<'_, Self>
The predicate of this quad.
Source§fn o(&self) -> QBorrowTerm<'_, Self>
fn o(&self) -> QBorrowTerm<'_, Self>
The object of this quad.
Source§fn to_spog(self) -> Spog<Self::Term>
fn to_spog(self) -> Spog<Self::Term>
Consume this quad, returning all its components. Read more
Source§fn spog(
&self,
) -> ([<Self::Term as Term>::BorrowTerm<'_>; 3], Option<<Self::Term as Term>::BorrowTerm<'_>>)
fn spog( &self, ) -> ([<Self::Term as Term>::BorrowTerm<'_>; 3], Option<<Self::Term as Term>::BorrowTerm<'_>>)
The four components of this quad, as a quad of borrowed terms. Read more
Source§fn matched_by<S, P, O, G>(&self, sm: S, pm: P, om: O, gm: G) -> bool
fn matched_by<S, P, O, G>(&self, sm: S, pm: P, om: O, gm: G) -> bool
Checks that the constituents terms of this quad match the respective matchers.
Source§impl<'a> Quad for Trusted<Quad<'a>>
impl<'a> Quad for Trusted<Quad<'a>>
Source§fn s(&self) -> QBorrowTerm<'_, Self>
fn s(&self) -> QBorrowTerm<'_, Self>
The subject of this quad.
Source§fn p(&self) -> QBorrowTerm<'_, Self>
fn p(&self) -> QBorrowTerm<'_, Self>
The predicate of this quad.
Source§fn o(&self) -> QBorrowTerm<'_, Self>
fn o(&self) -> QBorrowTerm<'_, Self>
The object of this quad.
Source§fn to_spog(self) -> Spog<Self::Term>
fn to_spog(self) -> Spog<Self::Term>
Consume this quad, returning all its components. Read more
Source§fn spog(
&self,
) -> ([<Self::Term as Term>::BorrowTerm<'_>; 3], Option<<Self::Term as Term>::BorrowTerm<'_>>)
fn spog( &self, ) -> ([<Self::Term as Term>::BorrowTerm<'_>; 3], Option<<Self::Term as Term>::BorrowTerm<'_>>)
The four components of this quad, as a quad of borrowed terms. Read more
Source§fn matched_by<S, P, O, G>(&self, sm: S, pm: P, om: O, gm: G) -> bool
fn matched_by<S, P, O, G>(&self, sm: S, pm: P, om: O, gm: G) -> bool
Checks that the constituents terms of this quad match the respective matchers.
Source§impl<'a> Term for Trusted<BlankNode<'a>>
impl<'a> Term for Trusted<BlankNode<'a>>
Source§type BorrowTerm<'x> = Trusted<BlankNode<'a>>
where
Self: 'x
type BorrowTerm<'x> = Trusted<BlankNode<'a>> where Self: '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 quoted tripes (Term::triple
)
or for sharing this term with a function that expects T: Term
(rather than &T
)
using Term::borrow_term
. Read moreSource§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 borrow_term(&self) -> Self::BorrowTerm<'_>
fn borrow_term(&self) -> Self::BorrowTerm<'_>
Source§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 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 language-tagged string,
return its language tag.
Otherwise return None
. Read moreSource§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 constiutents 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-independant 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
).Source§impl<'a> Term for Trusted<GeneralizedTerm<'a>>
impl<'a> Term for Trusted<GeneralizedTerm<'a>>
Source§type BorrowTerm<'x> = Trusted<GeneralizedTerm<'a>>
where
Self: 'x
type BorrowTerm<'x> = Trusted<GeneralizedTerm<'a>> where Self: '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 quoted tripes (Term::triple
)
or for sharing this term with a function that expects T: Term
(rather than &T
)
using Term::borrow_term
. Read moreSource§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 language-tagged string,
return its language tag.
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 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 borrow_term(&self) -> Self::BorrowTerm<'_>
fn borrow_term(&self) -> Self::BorrowTerm<'_>
Source§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 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 constiutents 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-independant 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
).Source§impl<'a> Term for Trusted<GraphName<'a>>
impl<'a> Term for Trusted<GraphName<'a>>
Source§type BorrowTerm<'x> = Trusted<GraphName<'a>>
where
Self: 'x
type BorrowTerm<'x> = Trusted<GraphName<'a>> where Self: '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 quoted tripes (Term::triple
)
or for sharing this term with a function that expects T: Term
(rather than &T
)
using Term::borrow_term
. Read moreSource§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 borrow_term(&self) -> Self::BorrowTerm<'_>
fn borrow_term(&self) -> Self::BorrowTerm<'_>
Source§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 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 language-tagged string,
return its language tag.
Otherwise return None
. Read moreSource§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 constiutents 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-independant 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
).Source§impl<'a> Term for Trusted<Literal<'a>>
impl<'a> Term for Trusted<Literal<'a>>
Source§type BorrowTerm<'x> = Trusted<Literal<'a>>
where
Self: 'x
type BorrowTerm<'x> = Trusted<Literal<'a>> where Self: '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 quoted tripes (Term::triple
)
or for sharing this term with a function that expects T: Term
(rather than &T
)
using Term::borrow_term
. 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 language-tagged string,
return its language tag.
Otherwise return None
. Read moreSource§fn borrow_term(&self) -> Self::BorrowTerm<'_>
fn borrow_term(&self) -> Self::BorrowTerm<'_>
Source§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 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 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 constiutents 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-independant 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
).Source§impl<'a> Term for Trusted<NamedNode<'a>>
impl<'a> Term for Trusted<NamedNode<'a>>
Source§type BorrowTerm<'x> = Trusted<NamedNode<'a>>
where
Self: 'x
type BorrowTerm<'x> = Trusted<NamedNode<'a>> where Self: '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 quoted tripes (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) -> Self::BorrowTerm<'_>
fn borrow_term(&self) -> Self::BorrowTerm<'_>
Source§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 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 language-tagged string,
return its language tag.
Otherwise return None
. Read moreSource§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 constiutents 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-independant 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
).Source§impl<'a> Term for Trusted<Term<'a>>
impl<'a> Term for Trusted<Term<'a>>
Source§type BorrowTerm<'x> = Trusted<Term<'a>>
where
Self: 'x
type BorrowTerm<'x> = Trusted<Term<'a>> where Self: '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 quoted tripes (Term::triple
)
or for sharing this term with a function that expects T: Term
(rather than &T
)
using Term::borrow_term
. Read moreSource§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 language-tagged string,
return its language tag.
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 borrow_term(&self) -> Self::BorrowTerm<'_>
fn borrow_term(&self) -> Self::BorrowTerm<'_>
Source§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 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 constiutents 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-independant 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
).Source§impl<'a> Term for Trusted<Variable<'a>>
impl<'a> Term for Trusted<Variable<'a>>
Source§type BorrowTerm<'x> = Trusted<Variable<'a>>
where
Self: 'x
type BorrowTerm<'x> = Trusted<Variable<'a>> where Self: '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 quoted tripes (Term::triple
)
or for sharing this term with a function that expects T: Term
(rather than &T
)
using Term::borrow_term
. Read moreSource§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 borrow_term(&self) -> Self::BorrowTerm<'_>
fn borrow_term(&self) -> Self::BorrowTerm<'_>
Source§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 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 language-tagged string,
return its language tag.
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 constiutents 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-independant 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
).Source§impl<'a> Triple for Trusted<Triple<'a>>
impl<'a> Triple for Trusted<Triple<'a>>
Source§fn s(&self) -> TBorrowTerm<'_, Self>
fn s(&self) -> TBorrowTerm<'_, Self>
The subject of this triple.
Source§fn p(&self) -> TBorrowTerm<'_, Self>
fn p(&self) -> TBorrowTerm<'_, Self>
The predicate of this triple.
Source§fn o(&self) -> TBorrowTerm<'_, Self>
fn o(&self) -> TBorrowTerm<'_, Self>
The object of this triple.
Source§fn to_spo(self) -> [Self::Term; 3]
fn to_spo(self) -> [Self::Term; 3]
Consume this triple, returning all its components. Read more
Source§fn spo(&self) -> [<Self::Term as Term>::BorrowTerm<'_>; 3]
fn spo(&self) -> [<Self::Term as Term>::BorrowTerm<'_>; 3]
The three components of this triple, as a triple of borrowed terms. Read more
Source§fn matched_by<S, P, O>(&self, sm: S, pm: P, om: O) -> bool
fn matched_by<S, P, O>(&self, sm: S, pm: P, om: O) -> bool
Checks that the constituents terms of this triple match the respective matchers.
impl<T: Copy> Copy for Trusted<T>
Auto Trait Implementations§
impl<T> Freeze for Trusted<T>where
T: Freeze,
impl<T> RefUnwindSafe for Trusted<T>where
T: RefUnwindSafe,
impl<T> Send for Trusted<T>where
T: Send,
impl<T> Sync for Trusted<T>where
T: Sync,
impl<T> Unpin for Trusted<T>where
T: Unpin,
impl<T> UnwindSafe for Trusted<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