pub trait WireEncode {
// Required method
fn encode_wire(&self, out: &mut Vec<u8>) -> Result<(), WireError>;
// Provided method
fn to_wire_bytes(&self) -> Result<Vec<u8>, WireError> { ... }
}Required Methods§
fn encode_wire(&self, out: &mut Vec<u8>) -> Result<(), WireError>
Provided Methods§
fn to_wire_bytes(&self) -> Result<Vec<u8>, WireError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".