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>
impl<'l, T, B> Processed<'l, T, B>
pub fn new(unprocessed: &'l Context, processed: Context<T, B>) -> Self
pub fn unprocessed(&self) -> &'l Context
pub fn into_processed(self) -> Context<T, B>
pub fn as_ref(&self) -> ProcessedRef<'l, '_, T, B>
pub fn into_owned(self) -> ProcessedOwned<T, B>
Methods from Deref<Target = Context<T, B>>§
Sourcepub fn get<Q>(&self, term: &Q) -> Option<TermDefinitionRef<'_, T, B>>
pub fn get<Q>(&self, term: &Q) -> Option<TermDefinitionRef<'_, T, B>>
Returns a reference to the given term
definition, if any.
Sourcepub fn get_normal<Q>(&self, term: &Q) -> Option<&NormalTermDefinition<T, B>>
pub fn get_normal<Q>(&self, term: &Q) -> Option<&NormalTermDefinition<T, B>>
Returns a reference to the given term
normal definition, if any.
Sourcepub fn get_type(&self) -> Option<&TypeTermDefinition>
pub fn get_type(&self) -> Option<&TypeTermDefinition>
Returns a reference to the @type
definition, if any.
Sourcepub fn contains_term<Q>(&self, term: &Q) -> bool
pub fn contains_term<Q>(&self, term: &Q) -> bool
Checks if the given term
is defined.
Sourcepub fn original_base_url(&self) -> Option<&T>
pub fn original_base_url(&self) -> Option<&T>
Returns the original base URL of the context.
Sourcepub fn vocabulary(&self) -> Option<&Term<T, B>>
pub fn vocabulary(&self) -> Option<&Term<T, B>>
Returns the @vocab
value, if any.
Sourcepub fn default_language(&self) -> Option<&LenientLangTag>
pub fn default_language(&self) -> Option<&LenientLangTag>
Returns the default @language
value.
Sourcepub fn default_base_direction(&self) -> Option<Direction>
pub fn default_base_direction(&self) -> Option<Direction>
Returns the default @direction
value.
Sourcepub fn previous_context(&self) -> Option<&Context<T, B>>
pub fn previous_context(&self) -> Option<&Context<T, B>>
Returns a reference to the previous context.
Sourcepub fn definitions(&self) -> &Definitions<T, B>
pub fn definitions(&self) -> &Definitions<T, B>
Returns a handle to the term definitions.
Sourcepub fn has_protected_items(&self) -> bool
pub fn has_protected_items(&self) -> bool
Checks if the context has a protected definition.
Sourcepub fn inverse(&self) -> &InverseContext<T, B>
pub fn inverse(&self) -> &InverseContext<T, B>
Returns the inverse of this context.
Sourcepub fn set_normal(
&mut self,
key: Key,
definition: Option<NormalTermDefinition<T, B>>,
) -> Option<NormalTermDefinition<T, B>>
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
.
Sourcepub fn set_type(
&mut self,
type_: Option<TypeTermDefinition>,
) -> Option<TypeTermDefinition>
pub fn set_type( &mut self, type_: Option<TypeTermDefinition>, ) -> Option<TypeTermDefinition>
Sets the @type
definition.
Sourcepub fn set_base_iri(&mut self, iri: Option<T>)
pub fn set_base_iri(&mut self, iri: Option<T>)
Sets the base IRI.
Sourcepub fn set_vocabulary(&mut self, vocab: Option<Term<T, B>>)
pub fn set_vocabulary(&mut self, vocab: Option<Term<T, B>>)
Sets the @vocab
value.
Sourcepub fn set_default_language(&mut self, lang: Option<LenientLangTagBuf>)
pub fn set_default_language(&mut self, lang: Option<LenientLangTagBuf>)
Sets the default @language
value.
Sourcepub fn set_default_base_direction(&mut self, dir: Option<Direction>)
pub fn set_default_base_direction(&mut self, dir: Option<Direction>)
Sets the default @direction
value.
Sourcepub fn set_previous_context(&mut self, previous: Context<T, B>)
pub fn set_previous_context(&mut self, previous: Context<T, B>)
Sets the previous context.