pub struct IndexVocabulary<I = IriIndex, B = BlankIdIndex, L = LiteralIndex> { /* private fields */ }
Expand description

Vocabulary that stores IRIs and blank node identifiers with a unique index.

Implementations§

source§

impl<I, B> IndexVocabulary<I, B>

source

pub fn new() -> Self

Trait Implementations§

source§

impl<I, B: IndexedBlankId, L> BlankIdVocabulary for IndexVocabulary<I, B, L>

§

type BlankId = B

source§

fn blank_id<'b>(&'b self, id: &'b B) -> Option<&'b BlankId>

Returns the blank node identifier associated to the given id.
source§

fn get_blank_id(&self, blank_id: &BlankId) -> Option<B>

Returns the vocabulary id of the given blank node identifier, if any.
source§

fn owned_blank_id(&self, id: Self::BlankId) -> Result<BlankIdBuf, Self::BlankId>

Returns a copy of the blank node identifier associated to the given id.
source§

impl<I, B: IndexedBlankId, L> BlankIdVocabularyMut for IndexVocabulary<I, B, L>

source§

fn insert_blank_id(&mut self, blank_id: &BlankId) -> Self::BlankId

Inserts a blank node identifier to the vocabulary and returns its id. Read more
source§

fn insert_owned_blank_id(&mut self, id: BlankIdBuf) -> Self::BlankId

source§

impl<I, B, L> Default for IndexVocabulary<I, B, L>

source§

fn default() -> Self

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

impl<I: IndexedIri, B, L> IriVocabulary for IndexVocabulary<I, B, L>

§

type Iri = I

source§

fn iri<'i>(&'i self, id: &'i I) -> Option<&'i Iri>

Returns the IRI associated to the given IRI id.
source§

fn get(&self, iri: &Iri) -> Option<I>

Returns the id of the given IRI, if any.
source§

fn owned_iri(&self, id: Self::Iri) -> Result<IriBuf, Self::Iri>

Returns a copy of the IRI associated to the given IRI id.
source§

impl<I: IndexedIri, B, L> IriVocabularyMut for IndexVocabulary<I, B, L>

source§

fn insert(&mut self, iri: &Iri) -> I

Inserts an IRI to the vocabulary and returns its id. Read more
source§

fn insert_owned(&mut self, iri: IriBuf) -> Self::Iri

source§

impl<I: Clone + IndexedIri + Eq + Hash, B, L: IndexedLiteral<I>> LiteralVocabulary for IndexVocabulary<I, B, L>

§

type Literal = L

Literal identifier type.
source§

fn literal<'b>(&'b self, id: &'b L) -> Option<LiteralRef<'b, I>>

source§

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

source§

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

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

impl<I: IndexedIri + Clone + Eq + Hash, B, L: IndexedLiteral<I>> LiteralVocabularyMut for IndexVocabulary<I, B, L>

source§

fn insert_literal( &mut self, literal: LiteralRef<'_, Self::Iri> ) -> Self::Literal

source§

fn insert_owned_literal(&mut self, literal: Literal<I>) -> Self::Literal

Auto Trait Implementations§

§

impl<I, B, L> Freeze for IndexVocabulary<I, B, L>

§

impl<I, B, L> RefUnwindSafe for IndexVocabulary<I, B, L>

§

impl<I, B, L> Send for IndexVocabulary<I, B, L>
where B: Send, I: Send, L: Send,

§

impl<I, B, L> Sync for IndexVocabulary<I, B, L>
where B: Sync, I: Sync, L: Sync,

§

impl<I, B, L> Unpin for IndexVocabulary<I, B, L>
where B: Unpin, I: Unpin, L: Unpin,

§

impl<I, B, L> UnwindSafe for IndexVocabulary<I, B, L>
where B: UnwindSafe, I: UnwindSafe, L: 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> 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<V> TryExportId<<V as IriVocabulary>::Iri, <V as BlankIdVocabulary>::BlankId> for V
where V: Vocabulary,

§

type Error = Id<<V as IriVocabulary>::Iri, <V as BlankIdVocabulary>::BlankId>

source§

fn try_export_id( &self, id: Id<<V as IriVocabulary>::Iri, <V as BlankIdVocabulary>::BlankId> ) -> Result<Id, <V as TryExportId<<V as IriVocabulary>::Iri, <V as BlankIdVocabulary>::BlankId>>::Error>

Turns an Id<I, B> into an Id.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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.
source§

impl<V> Vocabulary for V

source§

impl<V> VocabularyMut for V