pub struct Runtime<E = NOp>where
E: InstructionSet,{ /* private fields */ }Expand description
AluVM runtime execution environment
Implementations§
Source§impl<E> Runtime<E>where
E: InstructionSet,
impl<E> Runtime<E>where
E: InstructionSet,
Sourcepub fn libs_ref(&self) -> &BTreeMap<LibHash, Lib<E>>
pub fn libs_ref(&self) -> &BTreeMap<LibHash, Lib<E>>
Method borrowing Runtime::libs field.
Libraries known to the runtime, identified by their hashes
Sourcepub fn entrypoint_ref(&self) -> &LibSite
pub fn entrypoint_ref(&self) -> &LibSite
Method borrowing Runtime::entrypoint field.
Entrypoint for the main function
Sourcepub fn registers_ref(&self) -> &Registers
pub fn registers_ref(&self) -> &Registers
Method borrowing Runtime::registers field.
A set of registers
Source§impl<E> Runtime<E>where
E: InstructionSet,
impl<E> Runtime<E>where
E: InstructionSet,
pub fn new() -> Runtime<E>
pub fn with(lib: Lib<E>) -> Runtime<E>
Sourcepub fn add_lib(&mut self, lib: Lib<E>) -> bool
pub fn add_lib(&mut self, lib: Lib<E>) -> bool
Adds Alu bytecode library to the runtime environment. Returns if the library was already known.
pub fn set_entrypoint(&mut self, entrypoint: LibSite)
pub fn main(&mut self) -> Result<bool, NoLibraryError>
pub fn call(&mut self, method: LibSite) -> Result<bool, NoLibraryError>
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Runtime<E>
impl<E> RefUnwindSafe for Runtime<E>where
E: RefUnwindSafe,
impl<E> Send for Runtime<E>where
E: Send,
impl<E> Sync for Runtime<E>where
E: Sync,
impl<E> Unpin for Runtime<E>
impl<E> UnwindSafe for Runtime<E>where
E: RefUnwindSafe,
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