Trait Encode

Source
pub trait Encode: Sized {
    // Required methods
    fn read<R>(r: &mut R) -> Result<Self>
       where R: Read;
    fn write<W>(&self, w: &mut W) -> Result<()>
       where W: Write;
}

Required Methods§

Source

fn read<R>(r: &mut R) -> Result<Self>
where R: Read,

Source

fn write<W>(&self, w: &mut W) -> Result<()>
where W: Write,

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.

Implementations on Foreign Types§

Source§

impl Encode for String

Source§

fn read<T: Read>(data: &mut T) -> Result<Self>

Source§

fn write<W>(&self, w: &mut W) -> Result<()>
where W: Write,

Source§

impl Encode for Matrix4<f32>

Source§

fn read<R>(data: &mut R) -> Result<Self>
where R: Read,

Source§

fn write<W>(&self, w: &mut W) -> Result<()>
where W: Write,

Source§

impl Encode for Point2<f32>

Source§

fn read<R>(data: &mut R) -> Result<Self>
where R: Read,

Source§

fn write<W>(&self, w: &mut W) -> Result<()>
where W: Write,

Source§

impl Encode for Point3<f32>

Source§

fn read<R>(data: &mut R) -> Result<Self>
where R: Read,

Source§

fn write<W>(&self, w: &mut W) -> Result<()>
where W: Write,

Source§

impl Encode for Vector3<f32>

Source§

fn read<R>(data: &mut R) -> Result<Self>
where R: Read,

Source§

fn write<W>(&self, w: &mut W) -> Result<()>
where W: Write,

Source§

impl<'a> Encode for Cow<'a, str>

Source§

fn read<T: Read>(data: &mut T) -> Result<Self>

Source§

fn write<W>(&self, w: &mut W) -> Result<()>
where W: Write,

Implementors§