Trait Encode

Source
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§

Source

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.

Implementors§

Source§

impl<T> Encode for T
where T: Write,