pub trait EncodeExt: BitEncode {
// Provided method
fn encode<W: Write>(&self, w: &mut W) -> Result<(), BitError>
where Self: Sized { ... }
}Expand description
encode(writer) for any BitEncode message — encodes to a Vec (using the
type’s LAYOUT) and writes it to a std::io::Write
sink. A blanket-implemented extension trait, so bring it into scope
(use bnb::prelude::* or use bnb::EncodeExt) to call .encode(&mut w).
Only available with the std feature; in no_std use BitEncode’s
generated to_bytes/encode_into.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".