wasmtime_wasi::bindings::sync::cli::exit

Trait Host

source
pub trait Host: Send {
    // Required methods
    fn exit(&mut self, status: Result<(), ()>) -> Result<()>;
    fn exit_with_code(&mut self, status_code: u8) -> Result<()>;
}

Required Methods§

source

fn exit(&mut self, status: Result<(), ()>) -> Result<()>

Exit the current instance and any linked instances.

source

fn exit_with_code(&mut self, status_code: u8) -> Result<()>

Exit the current instance and any linked instances, reporting the specified status code to the host.

The meaning of the code depends on the context, with 0 usually meaning “success”, and other values indicating various types of failure.

This function does not return; the effect is analogous to a trap, but without the connotation that something bad has happened.

Implementations on Foreign Types§

source§

impl<_T: Host + ?Sized + Send> Host for &mut _T

source§

fn exit(&mut self, status: Result<(), ()>) -> Result<()>

Exit the current instance and any linked instances.

source§

fn exit_with_code(&mut self, status_code: u8) -> Result<()>

Exit the current instance and any linked instances, reporting the specified status code to the host.

The meaning of the code depends on the context, with 0 usually meaning “success”, and other values indicating various types of failure.

This function does not return; the effect is analogous to a trap, but without the connotation that something bad has happened.

Implementors§

source§

impl<T> Host for WasiImpl<T>
where T: WasiView,