Struct alure::Runtime[][src]

pub struct Runtime<E = NOp> where
    E: InstructionSet
{ /* fields omitted */ }
Expand description

AluVM runtime execution environment

Implementations

impl<E> Runtime<E> where
    E: InstructionSet
[src]

pub fn libs_ref(&self) -> &BTreeMap<LibHash, Lib<E>>[src]

Method borrowing Runtime::libs field. Libraries known to the runtime, identified by their hashes

pub fn entrypoint_ref(&self) -> &LibSite[src]

Method borrowing Runtime::entrypoint field. Entrypoint for the main function

pub fn registers_ref(&self) -> &Registers[src]

Method borrowing Runtime::registers field. A set of registers

impl<E> Runtime<E> where
    E: InstructionSet
[src]

pub fn new() -> Runtime<E>[src]

pub fn with(lib: Lib<E>) -> Runtime<E>[src]

pub fn add_lib(&mut self, lib: Lib<E>) -> bool[src]

Adds Alu bytecode library to the runtime environment. Returns if the library was already known.

pub fn set_entrypoint(&mut self, entrypoint: LibSite)[src]

pub fn main(&mut self) -> Result<bool, NoLibraryError>[src]

pub fn call(&mut self, method: LibSite) -> Result<bool, NoLibraryError>[src]

Trait Implementations

impl<E: Debug> Debug for Runtime<E> where
    E: InstructionSet
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<E: Default> Default for Runtime<E> where
    E: InstructionSet
[src]

fn default() -> Runtime<E>[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.