pub struct Interpreter<'a> { /* private fields */ }Expand description
A pure Rust interpreter for Mangle IR.
Implementations§
Source§impl<'a> Interpreter<'a>
impl<'a> Interpreter<'a>
pub fn new(ir: &'a Ir, store: Box<dyn Store + 'a>) -> Self
Sourcepub fn with_provenance(self) -> Self
pub fn with_provenance(self) -> Self
Enable provenance recording. When set, every successful insert records which premise facts were in the current environment.
Sourcepub fn store(&self) -> &dyn Store
pub fn store(&self) -> &dyn Store
Helper to get the underlying store (e.g. to inspect results).
Sourcepub fn into_store(self) -> Box<dyn Store + 'a>
pub fn into_store(self) -> Box<dyn Store + 'a>
Consumes the interpreter and returns the underlying store.
Sourcepub fn into_provenance(self) -> Option<ProvenanceRecorder>
pub fn into_provenance(self) -> Option<ProvenanceRecorder>
Consume the interpreter, returning the provenance recorder if enabled.
Sourcepub fn into_parts(self) -> (Box<dyn Store + 'a>, Option<ProvenanceRecorder>)
pub fn into_parts(self) -> (Box<dyn Store + 'a>, Option<ProvenanceRecorder>)
Consume the interpreter, returning the store and optional provenance.
Auto Trait Implementations§
impl<'a> Freeze for Interpreter<'a>
impl<'a> !RefUnwindSafe for Interpreter<'a>
impl<'a> !Send for Interpreter<'a>
impl<'a> !Sync for Interpreter<'a>
impl<'a> Unpin for Interpreter<'a>
impl<'a> UnsafeUnpin for Interpreter<'a>
impl<'a> !UnwindSafe for Interpreter<'a>
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