pub trait Encode: Write {
// Provided method
fn encode_msg(&mut self, msg: impl Encodable) -> Result<()> { ... }
}
Available on crate feature
std
only.Expand description
A trait to encode a type onto this std::io::Write
Provided Methods§
Sourcefn encode_msg(&mut self, msg: impl Encodable) -> Result<()>
fn encode_msg(&mut self, msg: impl Encodable) -> Result<()>
Encode the given type
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.