pub struct IndexVocabulary<I = Index, B = Index> { /* 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> BlankIdVocabulary for IndexVocabulary<I, B>

§

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§

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

source§

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

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

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

source§

fn default() -> Self

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

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

§

type Iri = I

source§

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

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§

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

source§

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

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

Auto Trait Implementations§

§

impl<I, B> RefUnwindSafe for IndexVocabulary<I, B>where B: RefUnwindSafe, I: RefUnwindSafe,

§

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

§

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

§

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

§

impl<I, B> UnwindSafe for IndexVocabulary<I, B>where B: UnwindSafe, I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V> Vocabulary for Vwhere V: IriVocabulary + BlankIdVocabulary,

source§

impl<V> VocabularyMut for Vwhere V: IriVocabularyMut + BlankIdVocabularyMut,