Trait bttp::DeserCallback
source · pub trait DeserCallback {
type Arg<'de>: 'de + Deserialize<'de> + Send
where Self: 'de;
type Return;
type CallFut<'de>: 'de + Future<Output = Self::Return> + Send
where Self: 'de;
// Required method
fn call<'de>(&'de mut self, arg: Self::Arg<'de>) -> Self::CallFut<'de>;
}
Expand description
A trait for types which can be called to asynchronously handle deserialization. This trait is what enables zero-copy handling of messages which support borrowing data during deserialization.