pub struct TypeSpace { /* private fields */ }Expand description
Directory of currently-known non-primitive PartiallyAppliedTerms for a given
TypeId in the context of an crate::interpreter_state::InterpreterState.
Implementations§
Source§impl TypeSpace
impl TypeSpace
Sourcepub fn get_num_terms(&self) -> usize
pub fn get_num_terms(&self) -> usize
Gets the number of terms in this type-space
Sourcepub fn get(&self, term_index: usize) -> &PartiallyAppliedTerm
pub fn get(&self, term_index: usize) -> &PartiallyAppliedTerm
Gets the term with the given index from this type-space
Sourcepub fn add(&mut self, term: PartiallyAppliedTerm) -> NonPrimitiveTermPointer
pub fn add(&mut self, term: PartiallyAppliedTerm) -> NonPrimitiveTermPointer
Adds a given term to this type-space if it doesn’t already exist in that space, otherwise returns a reference to the previously-added term
Auto Trait Implementations§
impl Freeze for TypeSpace
impl RefUnwindSafe for TypeSpace
impl Send for TypeSpace
impl Sync for TypeSpace
impl Unpin for TypeSpace
impl UnwindSafe for TypeSpace
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