Skip to main content

Interpretation

Trait Interpretation 

Source
pub trait Interpretation {
    type Resource;

    // Required methods
    fn iri(&self, iri: Iri<&str>) -> Option<Self::Resource>;
    fn literal<'a>(
        &self,
        literal: impl Into<LiteralRef<'a>>,
    ) -> Option<Self::Resource>;

    // Provided method
    fn term<'a>(&self, term: impl Into<TermRef<'a>>) -> Option<Self::Resource> { ... }
}
Expand description

RDF resource interpretation.

Required Associated Types§

Required Methods§

Source

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

Source

fn literal<'a>( &self, literal: impl Into<LiteralRef<'a>>, ) -> Option<Self::Resource>

Provided Methods§

Source

fn term<'a>(&self, term: impl Into<TermRef<'a>>) -> Option<Self::Resource>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Interpretation for ()

Source§

type Resource = LocalTerm

Source§

fn iri(&self, iri: Iri<&str>) -> Option<LocalTerm>

Source§

fn literal<'a>(&self, literal: impl Into<LiteralRef<'a>>) -> Option<LocalTerm>

Source§

impl<I: Interpretation> Interpretation for &I

Source§

type Resource = <I as Interpretation>::Resource

Source§

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

Source§

fn literal<'a>( &self, literal: impl Into<LiteralRef<'a>>, ) -> Option<Self::Resource>

Source§

impl<I: Interpretation> Interpretation for &mut I

Source§

type Resource = <I as Interpretation>::Resource

Source§

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

Source§

fn literal<'a>( &self, literal: impl Into<LiteralRef<'a>>, ) -> Option<Self::Resource>

Implementors§