pub trait ClientTaskDecode {
// Required method
fn decode_resp<C: Codec>(&mut self, codec: &C, buf: &[u8]) -> Result<(), ()>;
// Provided method
fn reserve_resp_blob(&mut self, _size: i32) -> Option<&mut [u8]> { ... }
}Expand description
Decode the response from server and assign to the task struct
Required Methods§
Provided Methods§
Sourcefn reserve_resp_blob(&mut self, _size: i32) -> Option<&mut [u8]>
fn reserve_resp_blob(&mut self, _size: i32) -> Option<&mut [u8]>
You can call crate::io::AllocateBuf::reserve(_size) on the following types:
Option<Vec<u8>>, Vec<u8>, Option<io_buffer::Buffer>, io_buffer::Buffer
By Default, return None when client task does not have a resp_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.