pub trait ClientTaskDone: Sized + 'static {
// Required methods
fn set_custom_error<C: Codec>(&mut self, codec: &C, e: EncodedErr);
fn set_rpc_error(&mut self, e: RpcIntErr);
fn set_ok(&mut self);
fn done(self);
}Expand description
How to notify from Rpc framework to user when a task is done
The rpc framework first call set_ok or set_xxx_error, then call done
Required Methods§
Sourcefn set_custom_error<C: Codec>(&mut self, codec: &C, e: EncodedErr)
fn set_custom_error<C: Codec>(&mut self, codec: &C, e: EncodedErr)
Set the result. Called by RPC framework
Sourcefn set_rpc_error(&mut self, e: RpcIntErr)
fn set_rpc_error(&mut self, e: RpcIntErr)
Called by RPC framework
fn set_ok(&mut self)
fn done(self)
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.