HostError

Trait HostError 

Source
pub trait HostError {
    // Required methods
    fn from_io_error(
        &mut self,
        error: Resource<IoError>,
    ) -> Result<Result<Resource<Error>, Resource<IoError>>>;
    fn to_debug_string(&mut self, self_: Resource<Error>) -> Result<String>;
    fn drop(&mut self, rep: Resource<Error>) -> Result<()>;
}

Required Methods§

Source

fn from_io_error( &mut self, error: Resource<IoError>, ) -> Result<Result<Resource<Error>, Resource<IoError>>>

Attempts to convert wasi:io/error.error into error.

Returns the original wasi:io/error.error in case of mismatch.

Source

fn to_debug_string(&mut self, self_: Resource<Error>) -> Result<String>

Returns a string that is suitable to assist humans in debugging this error.

WARNING: The returned string should not be consumed mechanically! It may change across platforms, hosts, or other implementation details. Parsing this string is a major platform-compatibility hazard.

Source

fn drop(&mut self, rep: Resource<Error>) -> Result<()>

Implementations on Foreign Types§

Source§

impl<_T: HostError + ?Sized> HostError for &mut _T

Source§

fn from_io_error( &mut self, error: Resource<IoError>, ) -> Result<Result<Resource<Error>, Resource<IoError>>>

Attempts to convert wasi:io/error.error into error.

Returns the original wasi:io/error.error in case of mismatch.

Source§

fn to_debug_string(&mut self, self_: Resource<Error>) -> Result<String>

Returns a string that is suitable to assist humans in debugging this error.

WARNING: The returned string should not be consumed mechanically! It may change across platforms, hosts, or other implementation details. Parsing this string is a major platform-compatibility hazard.

Source§

fn drop(&mut self, rep: Resource<Error>) -> Result<()>

Implementors§