pub trait Encode {
// Required method
fn try_serialize(self) -> FunctionResult<impl Into<Vec<u8>>>;
}Expand description
A payload which can be converted to a vector of bytes
Required Methods§
Sourcefn try_serialize(self) -> FunctionResult<impl Into<Vec<u8>>>
fn try_serialize(self) -> FunctionResult<impl Into<Vec<u8>>>
Convert the payload to a vector of bytes
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.