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,
        last_index: usize,
        conf_ver: u64,
    );
    fn set_rpc_error(&mut self, e: RpcIntErr);
    fn set_ok(&mut self);
    fn done(self);
}
Expand description

How to get 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, last_index: usize, conf_ver: u64, )

Set the custom error Called by RPC transport layer. the last_index and conf_ver is for FailoverPool callback to original ClientTask

Source

fn set_rpc_error(&mut self, e: RpcIntErr)

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".

Implementors§