Skip to main content

SpecEncodeExt

Trait SpecEncodeExt 

Source
pub trait SpecEncodeExt: SpecEncode {
    // Provided method
    fn spec_encode<W: Write>(&self, w: &mut W) -> Result<(), BitError>
       where Self: Sized { ... }
}
Expand description

spec_encode(writer) for any SpecEncode message — the spec-value dual of EncodeExt. Blanket-implemented; bring it into scope to call it. Only with the std feature; in no_std use the generated to_spec_bytes.

Provided Methods§

Source

fn spec_encode<W: Write>(&self, w: &mut W) -> Result<(), BitError>
where Self: Sized,

Encodes self to any std::io::Write, reserved fields as their spec value.

§Errors

ErrorKind::Io on a write failure, else the encode error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: SpecEncode> SpecEncodeExt for T

Available on crate feature std only.