Trait LiteralInterpretation

Source
pub trait LiteralInterpretation<L>: Interpretation {
    // Required method
    fn literal_interpretation(&self, literal: &L) -> Option<Self::Resource>;

    // Provided method
    fn lexical_literal_interpretation<V: LiteralVocabulary<Literal = L>>(
        &self,
        vocabulary: &V,
        literal: LiteralRef<'_, V::Iri>,
    ) -> Option<Self::Resource> { ... }
}
Expand description

Literal value interpretation.

Required Methods§

Source

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

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

Provided Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl LiteralInterpretation<Literal> for ()

Source§

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

Source§

impl<L, T: LiteralInterpretation<L>> LiteralInterpretation<L> for &T

Source§

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

Source§

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

Source§

impl<L, T: LiteralInterpretation<L>> LiteralInterpretation<L> for &mut T

Source§

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

Source§

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

Implementors§