pub trait BinaryWriter {
// Required method
fn write_to_slice(
&self,
writer: &mut UserSliceWriter,
offset: &mut Offset,
) -> Result<usize>;
}Expand description
Trait for types that can be written out as binary.
Required Methods§
Sourcefn write_to_slice(
&self,
writer: &mut UserSliceWriter,
offset: &mut Offset,
) -> Result<usize>
fn write_to_slice( &self, writer: &mut UserSliceWriter, offset: &mut Offset, ) -> Result<usize>
Writes the binary form of self into writer.
offset is the requested offset into the binary representation of self.
On success, returns the number of bytes written in to writer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".