pub struct Definitions<T, B> { /* private fields */ }
Expand description
Context term definitions.
Implementations§
Source§impl<T, B> Definitions<T, B>
impl<T, B> Definitions<T, B>
pub fn into_parts( self, ) -> (HashMap<Key, NormalTermDefinition<T, B>>, Option<TypeTermDefinition>)
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 definition of the given term
, 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 normal definition of the given term
, 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.
pub fn contains_term<Q>(&self, term: &Q) -> bool
Sourcepub fn insert(&mut self, binding: Binding<T, B>) -> Option<TermDefinition<T, B>>
pub fn insert(&mut self, binding: Binding<T, B>) -> Option<TermDefinition<T, B>>
Inserts the given binding
.
Sourcepub fn insert_normal(
&mut self,
term: Key,
definition: NormalTermDefinition<T, B>,
) -> Option<NormalTermDefinition<T, B>>
pub fn insert_normal( &mut self, term: Key, definition: NormalTermDefinition<T, B>, ) -> Option<NormalTermDefinition<T, B>>
Defines the given normal term.
Sourcepub fn insert_type(
&mut self,
definition: TypeTermDefinition,
) -> Option<TypeTermDefinition>
pub fn insert_type( &mut self, definition: TypeTermDefinition, ) -> Option<TypeTermDefinition>
Inserts the given @type
definition.
Sourcepub fn set_normal(
&mut self,
term: Key,
definition: Option<NormalTermDefinition<T, B>>,
) -> Option<NormalTermDefinition<T, B>>
pub fn set_normal( &mut self, term: Key, definition: Option<NormalTermDefinition<T, B>>, ) -> Option<NormalTermDefinition<T, B>>
Sets the given term
normal definition.
Sourcepub fn set_type(
&mut self,
definition: Option<TypeTermDefinition>,
) -> Option<TypeTermDefinition>
pub fn set_type( &mut self, definition: Option<TypeTermDefinition>, ) -> Option<TypeTermDefinition>
Sets the given @type
definition.
pub fn map_ids<U, C>( self, map_iri: impl FnMut(T) -> U, map_id: impl FnMut(Id<T, B>) -> Id<U, C>, ) -> Definitions<U, C>
Trait Implementations§
Source§impl<T, B> Clone for Definitions<T, B>
impl<T, B> Clone for Definitions<T, B>
Source§fn clone(&self) -> Definitions<T, B>
fn clone(&self) -> Definitions<T, B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T, B> Default for Definitions<T, B>
impl<T, B> Default for Definitions<T, B>
Source§fn default() -> Definitions<T, B>
fn default() -> Definitions<T, B>
Returns the “default value” for a type. Read more
Source§impl<'a, T, B> IntoIterator for &'a Definitions<T, B>
impl<'a, T, B> IntoIterator for &'a Definitions<T, B>
Source§type Item = BindingRef<'a, T, B>
type Item = BindingRef<'a, T, B>
The type of the elements being iterated over.
Source§fn into_iter(self) -> <&'a Definitions<T, B> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a Definitions<T, B> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl<T, B> IntoIterator for Definitions<T, B>
impl<T, B> IntoIterator for Definitions<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for Definitions<T, B>
impl<T, B> RefUnwindSafe for Definitions<T, B>where
T: RefUnwindSafe,
B: RefUnwindSafe,
impl<T, B> Send for Definitions<T, B>
impl<T, B> Sync for Definitions<T, B>
impl<T, B> Unpin for Definitions<T, B>
impl<T, B> UnwindSafe for Definitions<T, B>where
T: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more