Trait binrw::BinWrite[][src]

pub trait BinWrite {
    type Args: Clone;
    fn write_options<W: Write + Seek>(
        &self,
        writer: &mut W,
        options: &WriteOptions,
        args: Self::Args
    ) -> BinResult<()>; fn write_to<W: Write + Seek>(&self, writer: &mut W) -> BinResult<()>
    where
        Self::Args: Default
, { ... }
fn write_with_args<W: Write + Seek>(
        &self,
        writer: &mut W,
        args: Self::Args
    ) -> BinResult<()> { ... } }
Expand description

A trait for writing a given type to a writer

Associated Types

The type of arguments needed to be supplied in order to write this type, usually a tuple.

Note: For types that don’t require any arguments, use the unit (()) type. This will allow write_to to be used.

Required methods

Write the type to a writer, given the options on how to write it and the type-specific arguments

Provided methods

Write a type to a writer while assuming no arguments are needed.

Write the type to a writer while providing the default WriteOptions

Implementations on Foreign Types

Implementors