pub trait Encode {
// Required methods
fn encoded_size(&self) -> usize;
fn encode(&self, buf: &mut BytePages);
}Expand description
Defines routines to encode the type as an AMQP value. Encoding must include the type constructor (format code or described type definition).
Required Methods§
Sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Returns the size of the type when encoded.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".