pub trait WriteBinary<HostType = Self> {
type Output;
// Required method
fn write<C: WriteContext>(
ctxt: &mut C,
val: HostType,
) -> Result<Self::Output, WriteError>;
}Expand description
Trait that describes a type that can be written to a WriteContext in binary form.
Required Associated Types§
Required Methods§
Sourcefn write<C: WriteContext>(
ctxt: &mut C,
val: HostType,
) -> Result<Self::Output, WriteError>
fn write<C: WriteContext>( ctxt: &mut C, val: HostType, ) -> Result<Self::Output, WriteError>
Write the binary representation of Self to ctxt.
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.