pub trait LiteralVocabulary: IriVocabulary {
    type Literal;

    // Required methods
    fn literal<'l>(
        &'l self,
        id: &'l Self::Literal
    ) -> Option<LiteralRef<'l, Self::Iri>>;
    fn owned_literal(
        &self,
        id: Self::Literal
    ) -> Result<Literal<Self::Iri>, Self::Literal>;
    fn get_literal(
        &self,
        id: LiteralRef<'_, Self::Iri>
    ) -> Option<Self::Literal>;
}
Expand description

Literal value vocabulary.

Required Associated Types§

source

type Literal

Literal identifier type.

Required Methods§

source

fn literal<'l>( &'l self, id: &'l Self::Literal ) -> Option<LiteralRef<'l, Self::Iri>>

source

fn owned_literal( &self, id: Self::Literal ) -> Result<Literal<Self::Iri>, Self::Literal>

source

fn get_literal(&self, id: LiteralRef<'_, Self::Iri>) -> Option<Self::Literal>

Returns the vocabulary id of the given literal identifier, if any.

Implementations on Foreign Types§

source§

impl<'a, V: LiteralVocabulary> LiteralVocabulary for &'a V

§

type Literal = <V as LiteralVocabulary>::Literal

source§

fn literal<'l>( &'l self, id: &'l Self::Literal ) -> Option<LiteralRef<'l, V::Iri>>

source§

fn owned_literal( &self, id: Self::Literal ) -> Result<Literal<V::Iri>, Self::Literal>

source§

fn get_literal(&self, id: LiteralRef<'_, Self::Iri>) -> Option<Self::Literal>

source§

impl<'a, V: LiteralVocabulary> LiteralVocabulary for &'a mut V

§

type Literal = <V as LiteralVocabulary>::Literal

source§

fn literal<'l>( &'l self, id: &'l Self::Literal ) -> Option<LiteralRef<'l, V::Iri>>

source§

fn owned_literal( &self, id: Self::Literal ) -> Result<Literal<V::Iri>, Self::Literal>

source§

fn get_literal(&self, id: LiteralRef<'_, Self::Iri>) -> Option<Self::Literal>

Implementors§