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§
Sourcefn set_custom_error<C: Codec>(
&mut self,
codec: &C,
e: EncodedErr,
last_index: usize,
conf_ver: u64,
)
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
fn set_rpc_error(&mut self, e: RpcIntErr)
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.