pub trait HostError: Sized + Send {
// Required methods
fn from_rpc_error(
&mut self,
error: Resource<RpcError>,
) -> impl Future<Output = Result<Resource<Error>>> + Send;
fn from_io_error(
&mut self,
error: Resource<IoError>,
) -> impl Future<Output = Result<Result<Resource<Error>, Resource<IoError>>>> + Send;
fn to_debug_string(
&mut self,
self_: Resource<Error>,
) -> impl Future<Output = Result<String>> + Send;
fn drop(
&mut self,
rep: Resource<Error>,
) -> impl Future<Output = Result<()>> + Send;
}
Required Methods§
Sourcefn from_rpc_error(
&mut self,
error: Resource<RpcError>,
) -> impl Future<Output = Result<Resource<Error>>> + Send
fn from_rpc_error( &mut self, error: Resource<RpcError>, ) -> impl Future<Output = Result<Resource<Error>>> + Send
Converts wrpc:rpc/error.error
into error
.
Sourcefn from_io_error(
&mut self,
error: Resource<IoError>,
) -> impl Future<Output = Result<Result<Resource<Error>, Resource<IoError>>>> + Send
fn from_io_error( &mut self, error: Resource<IoError>, ) -> impl Future<Output = Result<Result<Resource<Error>, Resource<IoError>>>> + Send
Attempts to convert wasi:io/error.error
into error
.
Returns the original wasi:io/error.error
in case of mismatch.
Sourcefn to_debug_string(
&mut self,
self_: Resource<Error>,
) -> impl Future<Output = Result<String>> + Send
fn to_debug_string( &mut self, self_: Resource<Error>, ) -> impl Future<Output = Result<String>> + Send
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.
fn drop( &mut self, rep: Resource<Error>, ) -> impl Future<Output = Result<()>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<_T: HostError + ?Sized + Send> HostError for &mut _T
impl<_T: HostError + ?Sized + Send> HostError for &mut _T
Source§async fn from_rpc_error(
&mut self,
error: Resource<RpcError>,
) -> Result<Resource<Error>>
async fn from_rpc_error( &mut self, error: Resource<RpcError>, ) -> Result<Resource<Error>>
Converts wrpc:rpc/error.error
into error
.
Source§async fn from_io_error(
&mut self,
error: Resource<IoError>,
) -> Result<Result<Resource<Error>, Resource<IoError>>>
async 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§async fn to_debug_string(&mut self, self_: Resource<Error>) -> Result<String>
async 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.