pub struct Processed<'l, T, B, C, M> { /* private fields */ }
Expand description

Processed context that also borrows the original, unprocessed, context.

Implementations§

source§

impl<'l, T, B, C, M> Processed<'l, T, B, C, M>

source

pub fn unprocessed(&self) -> Meta<&'l C, &'l M>

source

pub fn into_processed(self) -> Context<T, B, C, M>

source

pub fn as_ref(&self) -> ProcessedRef<'l, '_, T, B, C, M>

source

pub fn into_owned(self) -> ProcessedOwned<T, B, C, M>
where C: Clone, M: Clone,

Methods from Deref<Target = Context<T, B, C, M>>§

source

pub fn get<Q>(&self, term: &Q) -> Option<TermDefinitionRef<'_, T, B, L, M>>
where Key: Borrow<Q>, KeywordType: Borrow<Q>, Q: Hash + Eq + ?Sized,

Returns a reference to the given term definition, if any.

source

pub fn get_normal<Q>( &self, term: &Q ) -> Option<&NormalTermDefinition<T, B, L, M>>
where Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

Returns a reference to the given term normal definition, if any.

source

pub fn get_type(&self) -> Option<&TypeTermDefinition>

Returns a reference to the @type definition, if any.

source

pub fn contains_term<Q>(&self, term: &Q) -> bool
where Key: Borrow<Q>, KeywordType: Borrow<Q>, Q: Hash + Eq + ?Sized,

Checks if the given term is defined.

source

pub fn original_base_url(&self) -> Option<&T>

Returns the original base URL of the context.

source

pub fn base_iri(&self) -> Option<&T>

Returns the base IRI of the context.

source

pub fn vocabulary(&self) -> Option<&Term<T, B>>

Returns the @vocab value, if any.

source

pub fn default_language(&self) -> Option<LenientLanguageTag<'_>>

Returns the default @language value.

source

pub fn default_base_direction(&self) -> Option<Direction>

Returns the default @direction value.

source

pub fn previous_context(&self) -> Option<&Context<T, B, L, M>>

Returns a reference to the previous context.

source

pub fn len(&self) -> usize

Returns the number of terms defined.

source

pub fn is_empty(&self) -> bool

Checks if no terms are defined.

source

pub fn definitions(&self) -> &Definitions<T, B, L, M>

Returns a handle to the term definitions.

source

pub fn has_protected_items(&self) -> bool

Checks if the context has a protected definition.

source

pub fn inverse(&self) -> &InverseContext<T, B>
where T: Clone + Hash + Eq, B: Clone + Hash + Eq,

Returns the inverse of this context.

source

pub fn set_normal( &mut self, key: Key, definition: Option<NormalTermDefinition<T, B, L, M>> ) -> Option<NormalTermDefinition<T, B, L, M>>

Sets the normal definition for the given term key.

source

pub fn set_type( &mut self, type_: Option<TypeTermDefinition> ) -> Option<TypeTermDefinition>

Sets the @type definition.

source

pub fn set_base_iri(&mut self, iri: Option<T>)

Sets the base IRI.

source

pub fn set_vocabulary(&mut self, vocab: Option<Term<T, B>>)

Sets the @vocab value.

source

pub fn set_default_language(&mut self, lang: Option<LenientLanguageTagBuf>)

Sets the default @language value.

source

pub fn set_default_base_direction(&mut self, dir: Option<Direction>)

Sets the default @direction value.

source

pub fn set_previous_context(&mut self, previous: Context<T, B, L, M>)

Sets the previous context.

Trait Implementations§

source§

impl<'l, T, B, C, M> Deref for Processed<'l, T, B, C, M>

§

type Target = Context<T, B, C, M>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'l, T, B, C, M> DerefMut for Processed<'l, T, B, C, M>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'l, T, B, C, M> RefUnwindSafe for Processed<'l, T, B, C, M>

§

impl<'l, T, B, C, M> Send for Processed<'l, T, B, C, M>
where B: Send, C: Send + Sync, M: Send + Sync, T: Send,

§

impl<'l, T, B, C, M> Sync for Processed<'l, T, B, C, M>
where B: Send + Sync, C: Sync, M: Sync, T: Send + Sync,

§

impl<'l, T, B, C, M> Unpin for Processed<'l, T, B, C, M>
where B: Unpin, C: Unpin, M: Unpin, T: Unpin,

§

impl<'l, T, B, C, M> UnwindSafe for Processed<'l, T, B, C, M>

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> At for T

source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. 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> BorrowStripped for T

source§

fn stripped(&self) -> &Stripped<T>

§

impl<T> BorrowUnordered for T

§

fn unordered(&self) -> &Unordered<T>

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, C> FromWithContext<T, C> for T

source§

fn from_with(value: T, _context: &C) -> T

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<T, U, C> IntoWithContext<U, C> for T
where U: FromWithContext<T, C>,

source§

fn into_with(self, context: &C) -> U

source§

impl<T> ToOwned for T

§

type Owned = T

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, C> TryFromWithContext<U, C> for T
where U: IntoWithContext<T, C>,

§

type Error = Infallible

source§

fn try_from_with( value: U, context: &C ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

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<T, U, C> TryIntoWithContext<U, C> for T
where U: TryFromWithContext<T, C>,

§

type Error = <U as TryFromWithContext<T, C>>::Error

source§

fn try_into_with( self, context: &C ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

source§

impl<T> WithContext for T
where T: ?Sized,

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>