Struct Processed

Source
pub struct Processed<'l, T = IriBuf, B = BlankIdBuf> {
    pub unprocessed: &'l Context,
    pub processed: Context<T, B>,
}
Expand description

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

Fields§

§unprocessed: &'l Context§processed: Context<T, B>

Implementations§

Source§

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

Source

pub fn new(unprocessed: &'l Context, processed: Context<T, B>) -> Self

Source

pub fn unprocessed(&self) -> &'l Context

Source

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

Source

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

Source

pub fn into_owned(self) -> ProcessedOwned<T, B>

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

Source

pub fn get<Q>(&self, term: &Q) -> Option<TermDefinitionRef<'_, T, B>>
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>>
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<&LenientLangTag>

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

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>

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>>, ) -> Option<NormalTermDefinition<T, B>>

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<LenientLangTagBuf>)

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

Sets the previous context.

Trait Implementations§

Source§

impl<T, B> Deref for Processed<'_, T, B>

Source§

type Target = Context<T, B>

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<T, B> DerefMut for Processed<'_, T, B>

Source§

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

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'l, T = IriBuf, B = BlankIdBuf> !Freeze for Processed<'l, T, B>

§

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

§

impl<'l, T, B> Send for Processed<'l, T, B>
where T: Send, B: Send,

§

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

§

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

§

impl<'l, T, B> UnwindSafe for Processed<'l, T, B>
where T: UnwindSafe, B: 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> 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>

Source§

impl<T> BorrowUnordered for 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

Source§

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

Source§

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

Source§

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>