Trait binary_stream::Encodable

source ·
pub trait Encodable {
    // Required method
    fn encode<W: Write + Seek>(
        &self,
        writer: &mut BinaryWriter<W>,
    ) -> Result<()>;
}
Expand description

Trait for encoding to binary.

Required Methods§

source

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

Encode self into the binary writer.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Encodable for bool

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for char

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for f32

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for f64

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for i8

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for i16

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for i32

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for i64

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for i128

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for isize

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for u8

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for u16

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for u32

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for u64

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for u128

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for usize

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl Encodable for String

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl<T> Encodable for Option<T>
where T: Encodable + Default,

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

source§

impl<T> Encodable for Vec<T>
where T: Encodable + Default,

source§

fn encode<W: Write + Seek>(&self, writer: &mut BinaryWriter<W>) -> Result<()>

Implementors§