Struct Trusted

Source
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<T: Clone> Clone for Trusted<T>

Source§

fn clone(&self) -> Trusted<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for Trusted<T>

Source§

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

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

impl<T> Deref for Trusted<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'a> Quad for Trusted<GeneralizedQuad<'a>>

Source§

type Term = Trusted<GeneralizedTerm<'a>>

The type of Term used by this quad when borrowing it
Source§

fn s(&self) -> QBorrowTerm<'_, Self>

The subject of this quad.
Source§

fn p(&self) -> QBorrowTerm<'_, Self>

The predicate of this quad.
Source§

fn o(&self) -> QBorrowTerm<'_, Self>

The object of this quad.
Source§

fn g(&self) -> Option<QBorrowTerm<'_, Self>>

The graph name of this quad. Read more
Source§

fn to_s(self) -> Self::Term

Consume this quad, returning its subject.
Source§

fn to_p(self) -> Self::Term

Consume this quad, returning its predicate.
Source§

fn to_o(self) -> Self::Term

Consume this quad, returning its object.
Source§

fn to_g(self) -> Option<Self::Term>

Consume this quad, returning its graph name.
Source§

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<'_>>)

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

Checks that the constituents terms of this quad match the respective matchers.
Source§

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

Check whether other is term-wise equal (using Term::eq) to self. Read more
Source§

fn eq_spog<S, P, O, G>(&self, s: S, p: P, o: O, g: Option<G>) -> bool
where S: Term, P: Term, O: Term, G: Term,

Check whether the quad (s, p, o) is term-wise equal (using Term::eq) to self. Read more
Source§

fn into_triple(self) -> [Self::Term; 3]

Convert this quad to a Triple (dropping the graph name) Read more
Source§

impl<'a> Quad for Trusted<Quad<'a>>

Source§

type Term = Trusted<Term<'a>>

The type of Term used by this quad when borrowing it
Source§

fn s(&self) -> QBorrowTerm<'_, Self>

The subject of this quad.
Source§

fn p(&self) -> QBorrowTerm<'_, Self>

The predicate of this quad.
Source§

fn o(&self) -> QBorrowTerm<'_, Self>

The object of this quad.
Source§

fn g(&self) -> Option<QBorrowTerm<'_, Self>>

The graph name of this quad. Read more
Source§

fn to_s(self) -> Self::Term

Consume this quad, returning its subject.
Source§

fn to_p(self) -> Self::Term

Consume this quad, returning its predicate.
Source§

fn to_o(self) -> Self::Term

Consume this quad, returning its object.
Source§

fn to_g(self) -> Option<Self::Term>

Consume this quad, returning its graph name.
Source§

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<'_>>)

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

Checks that the constituents terms of this quad match the respective matchers.
Source§

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

Check whether other is term-wise equal (using Term::eq) to self. Read more
Source§

fn eq_spog<S, P, O, G>(&self, s: S, p: P, o: O, g: Option<G>) -> bool
where S: Term, P: Term, O: Term, G: Term,

Check whether the quad (s, p, o) is term-wise equal (using Term::eq) to self. Read more
Source§

fn into_triple(self) -> [Self::Term; 3]

Convert this quad to a Triple (dropping the graph name) Read more
Source§

impl<'a> Term for Trusted<BlankNode<'a>>

Source§

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 more
Source§

fn kind(&self) -> TermKind

Return the kind of RDF term that this Term represents.
Source§

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 more
Source§

fn borrow_term(&self) -> Self::BorrowTerm<'_>

Get something implementing Term from a simple reference to self, representing the same RDF term as self. Read more
Source§

fn is_iri(&self) -> bool

Return true if this Term is an IRI, i.e. if kind retuns TermKind::Iri.
Source§

fn is_blank_node(&self) -> bool

Return true if this Term is a blank node, i.e. if kind retuns TermKind::BlankNode.
Source§

fn is_literal(&self) -> bool

Return true if this Term is a literal, i.e. if kind retuns TermKind::Literal.
Source§

fn is_variable(&self) -> bool

Return true if this Term is a variable, i.e. if kind retuns TermKind::Variable.
Source§

fn is_atom(&self) -> bool

Return true if this Term is an atomic term, i.e. an IRI, a blank node, a literal or a variable.
Source§

fn is_triple(&self) -> bool

Return true if this Term is an RDF-star quoted triple, i.e. if kind retuns TermKind::Triple.
Source§

fn iri(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Iri, return this IRI. Otherwise return None. Read more
Source§

fn lexical_form(&self) -> Option<MownStr<'_>>

If kind returns TermKind::Literal, return the lexical form of this literal. Otherwise return None. Read more
Source§

fn datatype(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Literal, return the datatype IRI of this literal. Otherwise return None. Read more
Source§

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 more
Source§

fn variable(&self) -> Option<VarName<MownStr<'_>>>

If kind returns TermKind::Variable, return the name of this variable. Otherwise return None. Read more
Source§

fn triple(&self) -> Option<[Self::BorrowTerm<'_>; 3]>

If kind returns TermKind::Triple, return this triple. Otherwise return None. Read more
Source§

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 more
Source§

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,

Iter over all the constiutents of this term, consuming it. Read more
Source§

fn atoms<'s>(&'s self) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>

Iter over all the atomic constituents of this term. Read more
Source§

fn to_atoms<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>
where Self: Sized + 'a,

Iter over all the atomic constituents of this term, consuming it. Read more
Source§

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

Check whether self and other represent the same RDF term.
Source§

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

Compare two terms: Read more
Source§

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

Compute an implementation-independant hash of this RDF term.
Source§

fn into_term<T>(self) -> T
where T: FromTerm, Self: Sized,

Convert this term in another type. Read more
Source§

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<'_>

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

Source§

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 more
Source§

fn kind(&self) -> TermKind

Return the kind of RDF term that this Term represents.
Source§

fn iri(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Iri, return this IRI. Otherwise return None. Read more
Source§

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 more
Source§

fn lexical_form(&self) -> Option<MownStr<'_>>

If kind returns TermKind::Literal, return the lexical form of this literal. Otherwise return None. Read more
Source§

fn datatype(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Literal, return the datatype IRI of this literal. Otherwise return None. Read more
Source§

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 more
Source§

fn triple(&self) -> Option<[Self::BorrowTerm<'_>; 3]>

If kind returns TermKind::Triple, return this triple. Otherwise return None. Read more
Source§

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 more
Source§

fn variable(&self) -> Option<VarName<MownStr<'_>>>

If kind returns TermKind::Variable, return the name of this variable. Otherwise return None. Read more
Source§

fn borrow_term(&self) -> Self::BorrowTerm<'_>

Get something implementing Term from a simple reference to self, representing the same RDF term as self. Read more
Source§

fn is_iri(&self) -> bool

Return true if this Term is an IRI, i.e. if kind retuns TermKind::Iri.
Source§

fn is_blank_node(&self) -> bool

Return true if this Term is a blank node, i.e. if kind retuns TermKind::BlankNode.
Source§

fn is_literal(&self) -> bool

Return true if this Term is a literal, i.e. if kind retuns TermKind::Literal.
Source§

fn is_variable(&self) -> bool

Return true if this Term is a variable, i.e. if kind retuns TermKind::Variable.
Source§

fn is_atom(&self) -> bool

Return true if this Term is an atomic term, i.e. an IRI, a blank node, a literal or a variable.
Source§

fn is_triple(&self) -> bool

Return true if this Term is an RDF-star quoted triple, i.e. if kind retuns TermKind::Triple.
Source§

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,

Iter over all the constiutents of this term, consuming it. Read more
Source§

fn atoms<'s>(&'s self) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>

Iter over all the atomic constituents of this term. Read more
Source§

fn to_atoms<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>
where Self: Sized + 'a,

Iter over all the atomic constituents of this term, consuming it. Read more
Source§

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

Check whether self and other represent the same RDF term.
Source§

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

Compare two terms: Read more
Source§

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

Compute an implementation-independant hash of this RDF term.
Source§

fn into_term<T>(self) -> T
where T: FromTerm, Self: Sized,

Convert this term in another type. Read more
Source§

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<'_>

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

Source§

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 more
Source§

fn kind(&self) -> TermKind

Return the kind of RDF term that this Term represents.
Source§

fn iri(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Iri, return this IRI. Otherwise return None. Read more
Source§

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 more
Source§

fn borrow_term(&self) -> Self::BorrowTerm<'_>

Get something implementing Term from a simple reference to self, representing the same RDF term as self. Read more
Source§

fn is_iri(&self) -> bool

Return true if this Term is an IRI, i.e. if kind retuns TermKind::Iri.
Source§

fn is_blank_node(&self) -> bool

Return true if this Term is a blank node, i.e. if kind retuns TermKind::BlankNode.
Source§

fn is_literal(&self) -> bool

Return true if this Term is a literal, i.e. if kind retuns TermKind::Literal.
Source§

fn is_variable(&self) -> bool

Return true if this Term is a variable, i.e. if kind retuns TermKind::Variable.
Source§

fn is_atom(&self) -> bool

Return true if this Term is an atomic term, i.e. an IRI, a blank node, a literal or a variable.
Source§

fn is_triple(&self) -> bool

Return true if this Term is an RDF-star quoted triple, i.e. if kind retuns TermKind::Triple.
Source§

fn lexical_form(&self) -> Option<MownStr<'_>>

If kind returns TermKind::Literal, return the lexical form of this literal. Otherwise return None. Read more
Source§

fn datatype(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Literal, return the datatype IRI of this literal. Otherwise return None. Read more
Source§

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 more
Source§

fn variable(&self) -> Option<VarName<MownStr<'_>>>

If kind returns TermKind::Variable, return the name of this variable. Otherwise return None. Read more
Source§

fn triple(&self) -> Option<[Self::BorrowTerm<'_>; 3]>

If kind returns TermKind::Triple, return this triple. Otherwise return None. Read more
Source§

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 more
Source§

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,

Iter over all the constiutents of this term, consuming it. Read more
Source§

fn atoms<'s>(&'s self) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>

Iter over all the atomic constituents of this term. Read more
Source§

fn to_atoms<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>
where Self: Sized + 'a,

Iter over all the atomic constituents of this term, consuming it. Read more
Source§

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

Check whether self and other represent the same RDF term.
Source§

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

Compare two terms: Read more
Source§

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

Compute an implementation-independant hash of this RDF term.
Source§

fn into_term<T>(self) -> T
where T: FromTerm, Self: Sized,

Convert this term in another type. Read more
Source§

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<'_>

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

Source§

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 more
Source§

fn kind(&self) -> TermKind

Return the kind of RDF term that this Term represents.
Source§

fn lexical_form(&self) -> Option<MownStr<'_>>

If kind returns TermKind::Literal, return the lexical form of this literal. Otherwise return None. Read more
Source§

fn datatype(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Literal, return the datatype IRI of this literal. Otherwise return None. Read more
Source§

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 more
Source§

fn borrow_term(&self) -> Self::BorrowTerm<'_>

Get something implementing Term from a simple reference to self, representing the same RDF term as self. Read more
Source§

fn is_iri(&self) -> bool

Return true if this Term is an IRI, i.e. if kind retuns TermKind::Iri.
Source§

fn is_blank_node(&self) -> bool

Return true if this Term is a blank node, i.e. if kind retuns TermKind::BlankNode.
Source§

fn is_literal(&self) -> bool

Return true if this Term is a literal, i.e. if kind retuns TermKind::Literal.
Source§

fn is_variable(&self) -> bool

Return true if this Term is a variable, i.e. if kind retuns TermKind::Variable.
Source§

fn is_atom(&self) -> bool

Return true if this Term is an atomic term, i.e. an IRI, a blank node, a literal or a variable.
Source§

fn is_triple(&self) -> bool

Return true if this Term is an RDF-star quoted triple, i.e. if kind retuns TermKind::Triple.
Source§

fn iri(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Iri, return this IRI. Otherwise return None. Read more
Source§

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 more
Source§

fn variable(&self) -> Option<VarName<MownStr<'_>>>

If kind returns TermKind::Variable, return the name of this variable. Otherwise return None. Read more
Source§

fn triple(&self) -> Option<[Self::BorrowTerm<'_>; 3]>

If kind returns TermKind::Triple, return this triple. Otherwise return None. Read more
Source§

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 more
Source§

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,

Iter over all the constiutents of this term, consuming it. Read more
Source§

fn atoms<'s>(&'s self) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>

Iter over all the atomic constituents of this term. Read more
Source§

fn to_atoms<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>
where Self: Sized + 'a,

Iter over all the atomic constituents of this term, consuming it. Read more
Source§

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

Check whether self and other represent the same RDF term.
Source§

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

Compare two terms: Read more
Source§

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

Compute an implementation-independant hash of this RDF term.
Source§

fn into_term<T>(self) -> T
where T: FromTerm, Self: Sized,

Convert this term in another type. Read more
Source§

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<'_>

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

Source§

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 more
Source§

fn kind(&self) -> TermKind

Return the kind of RDF term that this Term represents.
Source§

fn iri(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Iri, return this IRI. Otherwise return None. Read more
Source§

fn borrow_term(&self) -> Self::BorrowTerm<'_>

Get something implementing Term from a simple reference to self, representing the same RDF term as self. Read more
Source§

fn is_iri(&self) -> bool

Return true if this Term is an IRI, i.e. if kind retuns TermKind::Iri.
Source§

fn is_blank_node(&self) -> bool

Return true if this Term is a blank node, i.e. if kind retuns TermKind::BlankNode.
Source§

fn is_literal(&self) -> bool

Return true if this Term is a literal, i.e. if kind retuns TermKind::Literal.
Source§

fn is_variable(&self) -> bool

Return true if this Term is a variable, i.e. if kind retuns TermKind::Variable.
Source§

fn is_atom(&self) -> bool

Return true if this Term is an atomic term, i.e. an IRI, a blank node, a literal or a variable.
Source§

fn is_triple(&self) -> bool

Return true if this Term is an RDF-star quoted triple, i.e. if kind retuns TermKind::Triple.
Source§

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 more
Source§

fn lexical_form(&self) -> Option<MownStr<'_>>

If kind returns TermKind::Literal, return the lexical form of this literal. Otherwise return None. Read more
Source§

fn datatype(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Literal, return the datatype IRI of this literal. Otherwise return None. Read more
Source§

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 more
Source§

fn variable(&self) -> Option<VarName<MownStr<'_>>>

If kind returns TermKind::Variable, return the name of this variable. Otherwise return None. Read more
Source§

fn triple(&self) -> Option<[Self::BorrowTerm<'_>; 3]>

If kind returns TermKind::Triple, return this triple. Otherwise return None. Read more
Source§

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 more
Source§

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,

Iter over all the constiutents of this term, consuming it. Read more
Source§

fn atoms<'s>(&'s self) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>

Iter over all the atomic constituents of this term. Read more
Source§

fn to_atoms<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>
where Self: Sized + 'a,

Iter over all the atomic constituents of this term, consuming it. Read more
Source§

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

Check whether self and other represent the same RDF term.
Source§

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

Compare two terms: Read more
Source§

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

Compute an implementation-independant hash of this RDF term.
Source§

fn into_term<T>(self) -> T
where T: FromTerm, Self: Sized,

Convert this term in another type. Read more
Source§

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<'_>

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

Source§

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 more
Source§

fn kind(&self) -> TermKind

Return the kind of RDF term that this Term represents.
Source§

fn iri(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Iri, return this IRI. Otherwise return None. Read more
Source§

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 more
Source§

fn lexical_form(&self) -> Option<MownStr<'_>>

If kind returns TermKind::Literal, return the lexical form of this literal. Otherwise return None. Read more
Source§

fn datatype(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Literal, return the datatype IRI of this literal. Otherwise return None. Read more
Source§

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 more
Source§

fn triple(&self) -> Option<[Self::BorrowTerm<'_>; 3]>

If kind returns TermKind::Triple, return this triple. Otherwise return None. Read more
Source§

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 more
Source§

fn borrow_term(&self) -> Self::BorrowTerm<'_>

Get something implementing Term from a simple reference to self, representing the same RDF term as self. Read more
Source§

fn is_iri(&self) -> bool

Return true if this Term is an IRI, i.e. if kind retuns TermKind::Iri.
Source§

fn is_blank_node(&self) -> bool

Return true if this Term is a blank node, i.e. if kind retuns TermKind::BlankNode.
Source§

fn is_literal(&self) -> bool

Return true if this Term is a literal, i.e. if kind retuns TermKind::Literal.
Source§

fn is_variable(&self) -> bool

Return true if this Term is a variable, i.e. if kind retuns TermKind::Variable.
Source§

fn is_atom(&self) -> bool

Return true if this Term is an atomic term, i.e. an IRI, a blank node, a literal or a variable.
Source§

fn is_triple(&self) -> bool

Return true if this Term is an RDF-star quoted triple, i.e. if kind retuns TermKind::Triple.
Source§

fn variable(&self) -> Option<VarName<MownStr<'_>>>

If kind returns TermKind::Variable, return the name of this variable. Otherwise return None. Read more
Source§

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,

Iter over all the constiutents of this term, consuming it. Read more
Source§

fn atoms<'s>(&'s self) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>

Iter over all the atomic constituents of this term. Read more
Source§

fn to_atoms<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>
where Self: Sized + 'a,

Iter over all the atomic constituents of this term, consuming it. Read more
Source§

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

Check whether self and other represent the same RDF term.
Source§

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

Compare two terms: Read more
Source§

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

Compute an implementation-independant hash of this RDF term.
Source§

fn into_term<T>(self) -> T
where T: FromTerm, Self: Sized,

Convert this term in another type. Read more
Source§

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<'_>

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

Source§

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 more
Source§

fn kind(&self) -> TermKind

Return the kind of RDF term that this Term represents.
Source§

fn variable(&self) -> Option<VarName<MownStr<'_>>>

If kind returns TermKind::Variable, return the name of this variable. Otherwise return None. Read more
Source§

fn borrow_term(&self) -> Self::BorrowTerm<'_>

Get something implementing Term from a simple reference to self, representing the same RDF term as self. Read more
Source§

fn is_iri(&self) -> bool

Return true if this Term is an IRI, i.e. if kind retuns TermKind::Iri.
Source§

fn is_blank_node(&self) -> bool

Return true if this Term is a blank node, i.e. if kind retuns TermKind::BlankNode.
Source§

fn is_literal(&self) -> bool

Return true if this Term is a literal, i.e. if kind retuns TermKind::Literal.
Source§

fn is_variable(&self) -> bool

Return true if this Term is a variable, i.e. if kind retuns TermKind::Variable.
Source§

fn is_atom(&self) -> bool

Return true if this Term is an atomic term, i.e. an IRI, a blank node, a literal or a variable.
Source§

fn is_triple(&self) -> bool

Return true if this Term is an RDF-star quoted triple, i.e. if kind retuns TermKind::Triple.
Source§

fn iri(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Iri, return this IRI. Otherwise return None. Read more
Source§

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 more
Source§

fn lexical_form(&self) -> Option<MownStr<'_>>

If kind returns TermKind::Literal, return the lexical form of this literal. Otherwise return None. Read more
Source§

fn datatype(&self) -> Option<IriRef<MownStr<'_>>>

If kind returns TermKind::Literal, return the datatype IRI of this literal. Otherwise return None. Read more
Source§

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 more
Source§

fn triple(&self) -> Option<[Self::BorrowTerm<'_>; 3]>

If kind returns TermKind::Triple, return this triple. Otherwise return None. Read more
Source§

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 more
Source§

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,

Iter over all the constiutents of this term, consuming it. Read more
Source§

fn atoms<'s>(&'s self) -> Box<dyn Iterator<Item = Self::BorrowTerm<'s>> + 's>

Iter over all the atomic constituents of this term. Read more
Source§

fn to_atoms<'a>(self) -> Box<dyn Iterator<Item = Self> + 'a>
where Self: Sized + 'a,

Iter over all the atomic constituents of this term, consuming it. Read more
Source§

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

Check whether self and other represent the same RDF term.
Source§

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

Compare two terms: Read more
Source§

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

Compute an implementation-independant hash of this RDF term.
Source§

fn into_term<T>(self) -> T
where T: FromTerm, Self: Sized,

Convert this term in another type. Read more
Source§

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<'_>

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

Source§

type Term = Trusted<Term<'a>>

The type of Term contained by this triple
Source§

fn s(&self) -> TBorrowTerm<'_, Self>

The subject of this triple.
Source§

fn p(&self) -> TBorrowTerm<'_, Self>

The predicate of this triple.
Source§

fn o(&self) -> TBorrowTerm<'_, Self>

The object of this triple.
Source§

fn to_s(self) -> Self::Term

Consume this triple, returning its subject.
Source§

fn to_p(self) -> Self::Term

Consume this triple, returning its predicate.
Source§

fn to_o(self) -> Self::Term

Consume this triple, returning its object.
Source§

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]

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

Checks that the constituents terms of this triple match the respective matchers.
Source§

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

Check whether other is term-wise equal (using Term::eq) to self. Read more
Source§

fn eq_spo<S, P, O>(&self, s: S, p: P, o: O) -> bool
where S: Term, P: Term, O: Term,

Check whether the triple (s, p, o) is term-wise equal (using Term::eq) to self. Read more
Source§

fn into_quad(self) -> ([Self::Term; 3], Option<Self::Term>)

Convert this triple to a Quad in the default graph. Read more
Source§

fn into_quad_from( self, graph_name: Option<Self::Term>, ) -> ([Self::Term; 3], Option<Self::Term>)

Convert this triple to a Quad in the given named graph. Read more
Source§

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> 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<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<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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.