pub trait MethodDef {
type Input: Message;
type Output: Message;
const NAME: &'static str;
const PATH: ByteString;
// Provided methods
fn decode(&self, buf: &mut Bytes) -> Result<Self::Input, DecodeError> { ... }
fn encode(&self, val: Self::Output, buf: &mut BytePages) { ... }
}Expand description
Trait for service method definition
Required Associated Constants§
Required Associated Types§
Provided Methods§
fn decode(&self, buf: &mut Bytes) -> Result<Self::Input, DecodeError>
fn encode(&self, val: Self::Output, buf: &mut BytePages)
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.