pub trait ClientTaskEncode {
// Required method
fn encode_req<C: Codec>(
&self,
codec: &C,
buf: &mut Vec<u8>,
) -> Result<usize, ()>;
// Provided method
fn get_req_blob(&self) -> Option<&[u8]> { ... }
}Expand description
Encode the request to buffer that can be send to server
Required Methods§
Provided Methods§
Sourcefn get_req_blob(&self) -> Option<&[u8]>
fn get_req_blob(&self) -> Option<&[u8]>
Contain optional extra data to send to server side.
By Default, return None when client task does not have a req_blob field
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.