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>
Sourcepub fn into_parts(self) -> DefinitionParts<T, B>
pub fn into_parts(self) -> DefinitionParts<T, B>
Consumes this Definitions, returning its parts.
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.
Sourcepub fn contains_term<Q>(&self, term: &Q) -> bool
pub fn contains_term<Q>(&self, term: &Q) -> bool
Checks whether the given term is defined.
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.
Trait Implementations§
Source§impl<T, B> Default for Definitions<T, B>
impl<T, B> Default for Definitions<T, B>
impl<T: Eq, B: Eq> Eq for Definitions<T, B>
Source§impl<'a, T, B> IntoIterator for &'a Definitions<T, B>
impl<'a, T, B> IntoIterator for &'a Definitions<T, B>
Source§impl<T, B> IntoIterator for Definitions<T, B>
impl<T, B> IntoIterator for Definitions<T, B>
impl<T: PartialEq, B: PartialEq> StructuralPartialEq for Definitions<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for Definitions<T, B>
impl<T, B> RefUnwindSafe for Definitions<T, B>
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> UnsafeUnpin for Definitions<T, B>
impl<T, B> UnwindSafe for Definitions<T, B>
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if
self is equivalent to key.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.