[][src]Struct wasihost::wasi_snapshot_preview1::WasiHost

pub struct WasiHost<S: StringRepresentation> { /* fields omitted */ }

Host functions for WASI.

Methods

impl<S: StringRepresentation> WasiHost<S>[src]

pub fn new(
    arguments: impl IntoIterator<Item = impl Into<S>>,
    environment: impl IntoIterator<Item = impl Into<S>>,
    fd_initialzer: impl WasiFdInitializer<S>
) -> Arc<Self>
[src]

Creates a new WASI host.

pub fn run_file(
    self: Arc<Self>,
    wasm_file: impl AsRef<Path>
) -> Result<exitcode, Box<dyn Error>>
[src]

Runs a WASM file on this WASI host.

pub fn run_binary(
    self: Arc<Self>,
    wasm_binary: &[u8]
) -> Result<exitcode, Box<dyn Error>>
[src]

Runs a WASM binary from memory on this WASI host.

Trait Implementations

impl<S: Debug + StringRepresentation> Debug for WasiHost<S>[src]

impl<S: StringRepresentation> WasiImports for WasiHost<S>[src]

type StringRepresentation = S

String representation in the high-level APIs.

Auto Trait Implementations

impl<S> !RefUnwindSafe for WasiHost<S>

impl<S> Send for WasiHost<S>

impl<S> Sync for WasiHost<S>

impl<S> Unpin for WasiHost<S> where
    S: Unpin

impl<S> !UnwindSafe for WasiHost<S>

Blanket Implementations

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

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

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

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

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

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

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.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WasiImportsExt for T where
    T: WasiImports
[src]