BinaryWriter

Trait BinaryWriter 

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

Source

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.

Implementations on Foreign Types§

Source§

impl<T, A> BinaryWriter for Pin<Box<T, A>>
where T: BinaryWriter, A: Allocator,

Source§

fn write_to_slice( &self, writer: &mut UserSliceWriter, offset: &mut Offset, ) -> Result<usize>

Implementors§

Source§

impl<T> BinaryWriter for Arc<T>
where T: BinaryWriter,

Source§

impl<T, A> BinaryWriter for Box<T, A>
where T: BinaryWriter, A: Allocator,

Source§

impl<T, A> BinaryWriter for Vec<T, A>
where T: AsBytes, A: Allocator,

Source§

impl<T: AsBytes> BinaryWriter for T

Source§

impl<T: BinaryWriter> BinaryWriter for Mutex<T>