Struct VocabularyInterpretation

Source
pub struct VocabularyInterpretation<V: Vocabulary>(/* private fields */);
Expand description

Vocabulary interpretation.

This type is a special sort of interpretation where every term is interpreted as itself.

Implementations§

Trait Implementations§

Source§

impl<V: Vocabulary> BlankIdInterpretation<<V as BlankIdVocabulary>::BlankId> for VocabularyInterpretation<V>
where V::BlankId: Clone,

Source§

fn blank_id_interpretation( &self, blank_id: &V::BlankId, ) -> Option<Self::Resource>

Returns the interpretation of the given blank node identifier, if any.
Source§

fn lexical_blank_id_interpretation( &self, vocabulary: &impl BlankIdVocabulary<BlankId = B>, blank_id: &BlankId, ) -> Option<Self::Resource>
where B: Sized,

Source§

impl<V: Vocabulary> Default for VocabularyInterpretation<V>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<V: Vocabulary> Interpretation for VocabularyInterpretation<V>

Source§

type Resource = Term<Id<<V as IriVocabulary>::Iri, <V as BlankIdVocabulary>::BlankId>, <V as LiteralVocabulary>::Literal>

Resource identifier type.
Source§

impl<V: Vocabulary> IriInterpretation<<V as IriVocabulary>::Iri> for VocabularyInterpretation<V>
where V::Iri: Clone,

Source§

fn iri_interpretation(&self, iri: &V::Iri) -> Option<Self::Resource>

Returns the interpretation of the given IRI, if any.
Source§

fn lexical_iri_interpretation( &self, vocabulary: &impl IriVocabulary<Iri = I>, iri: &Iri, ) -> Option<Self::Resource>
where I: Sized,

Source§

impl<V: Vocabulary> LiteralInterpretation<<V as LiteralVocabulary>::Literal> for VocabularyInterpretation<V>
where V::Literal: Clone,

Source§

fn literal_interpretation(&self, literal: &V::Literal) -> Option<Self::Resource>

Returns the interpretation of the given literal value, if any.
Source§

fn lexical_literal_interpretation<V: LiteralVocabulary<Literal = L>>( &self, vocabulary: &V, literal: LiteralRef<'_, V::Iri>, ) -> Option<Self::Resource>

Source§

impl<V: Vocabulary> ReverseBlankIdInterpretation for VocabularyInterpretation<V>
where V::Iri: Eq + Hash, V::BlankId: Eq + Hash, V::Literal: Eq + Hash,

Source§

type BlankId = <V as BlankIdVocabulary>::BlankId

Source§

type BlankIds<'a> = BlankIdsOf<'a, V> where V: 'a, V::Iri: 'a, V::BlankId: 'a, V::Literal: 'a

Source§

fn blank_ids_of<'a>(&'a self, id: &'a Self::Resource) -> Self::BlankIds<'a>

Source§

impl<V: Vocabulary> ReverseIriInterpretation for VocabularyInterpretation<V>
where V::Iri: Eq + Hash, V::BlankId: Eq + Hash, V::Literal: Eq + Hash,

Source§

type Iri = <V as IriVocabulary>::Iri

Source§

type Iris<'a> = IrisOf<'a, V> where V: 'a, V::Iri: 'a, V::BlankId: 'a, V::Literal: 'a

Source§

fn iris_of<'a>(&'a self, id: &'a Self::Resource) -> Self::Iris<'a>

Source§

impl<V: Vocabulary> ReverseLiteralInterpretation for VocabularyInterpretation<V>
where V::Iri: Clone + Eq + Hash, V::BlankId: Clone + Eq + Hash, V::Literal: Clone + Eq + Hash,

Source§

type Literal = <V as LiteralVocabulary>::Literal

Source§

type Literals<'a> = LiteralsOf<'a, V> where V: 'a, V::Iri: 'a, V::BlankId: 'a, V::Literal: 'a

Source§

fn literals_of<'a>(&'a self, id: &'a Self::Resource) -> Self::Literals<'a>

Auto Trait Implementations§

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<I> FallibleInterpretation for I
where I: Interpretation,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<I, B, T> IdInterpretation<I, B> for T

Source§

fn id_interpretation(&self, id: &Id<I, B>) -> Option<Self::Resource>

Returns the interpretation of the given node identifier, if any.
Source§

fn lexical_id_interpretation( &self, vocabulary: &(impl IriVocabulary<Iri = I> + BlankIdVocabulary<BlankId = B>), id: Id<&Iri, &BlankId>, ) -> Option<Self::Resource>

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<I> ReverseIdInterpretation for I

Source§

fn ids_of<'a>(&'a self, id: &'a Self::Resource) -> IdsOf<'a, Self>

Source§

impl<I> ReverseTermInterpretation for I

Source§

fn terms_of<'a>(&'a self, id: &'a Self::Resource) -> TermsOf<'a, Self>

Source§

fn term_of<'a>(&'a self, id: &'a Self::Resource) -> Option<TermOf<'a, Self>>

Source§

fn has_term(&self, id: &Self::Resource) -> bool

Source§

fn quads_of<'a>( &'a self, quad: Quad<&'a Self::Resource, &'a Self::Resource, &'a Self::Resource, &'a Self::Resource>, ) -> QuadsOf<'a, Self>

Source§

fn grdf_quads_of<'a>( &'a self, quad: Quad<&'a Self::Resource, &'a Self::Resource, &'a Self::Resource, &'a Self::Resource>, ) -> GrdfQuadsOf<'a, Self>

Source§

impl<I, B, L, T> TermInterpretation<I, B, L> for T

Source§

fn term_interpretation( &self, term: &Term<Id<I, B>, L>, ) -> Option<Self::Resource>

Returns the interpretation of the given term, if any.
Source§

fn lexical_term_interpretation( &self, vocabulary: &impl Vocabulary<Iri = I, BlankId = B, Literal = L>, term: Term<Id<&Iri, &BlankId>, LiteralRef<'_, I>>, ) -> Option<Self::Resource>

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.