Skip to main content

ClientTaskDone

Trait ClientTaskDone 

Source
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§

Source

fn set_custom_error<C: Codec>(&mut self, codec: &C, e: EncodedErr)

Set the result. Called by RPC framework

Source

fn set_rpc_error(&mut self, e: RpcIntErr)

Called by RPC framework

Source

fn set_ok(&mut self)

Source

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.

Implementors§