Struct marine::Marine[][src]

pub struct Marine { /* fields omitted */ }
Expand description

The base struct of Marine, the Fluence compute runtime.

Implementations

impl Marine[src]

pub fn new() -> Self[src]

pub fn call<MN: AsRef<str>, FN: AsRef<str>>(
    &mut self,
    module_name: MN,
    func_name: FN,
    arguments: &[IValue]
) -> Result<Vec<IValue>, MError>
[src]

Invoke a function of a module inside Marine by given function name with given arguments.

pub fn load_module<S: Into<String>>(
    &mut self,
    name: S,
    wasm_bytes: &[u8],
    config: MModuleConfig
) -> Result<(), MError>
[src]

Load a new module inside Marine.

pub fn unload_module<S: AsRef<str>>(&mut self, name: S) -> Result<(), MError>[src]

Unload previously loaded module.

pub fn module_wasi_state<S: AsRef<str>>(
    &mut self,
    module_name: S
) -> Option<&WasiState>
[src]

pub fn interface(&self) -> impl Iterator<Item = (&str, MModuleInterface<'_>)>[src]

Return function signatures of all loaded info Marine modules with their names.

pub fn module_interface<S: AsRef<str>>(
    &self,
    module_name: S
) -> Option<MModuleInterface<'_>>
[src]

Return function signatures exported by module with given name.

pub fn module_record_types<S: AsRef<str>>(
    &self,
    module_name: S
) -> Option<&MRecordTypes>
[src]

Return record types exported by module with given name.

pub fn module_record_type_by_id<S: AsRef<str>>(
    &self,
    module_name: S,
    record_id: u64
) -> Option<&Rc<IRecordType>>
[src]

Return record type for supplied record id exported by module with given name.

Trait Implementations

impl Default for Marine[src]

fn default() -> Self[src]

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

Auto Trait Implementations

impl !RefUnwindSafe for Marine

impl !Send for Marine

impl !Sync for Marine

impl Unpin for Marine

impl !UnwindSafe for Marine

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> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

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.