Trait BytesConvertible

Source
pub trait BytesConvertible {
    // Required methods
    fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
       where Self: Sized,
             R: Read;
    fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
       where Self: Sized,
             R: Read;
    fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
       where Self: Sized,
             W: Write;
    fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
       where Self: Sized,
             W: Write;
}

Required Methods§

Source

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where Self: Sized, R: Read,

Source

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where Self: Sized, R: Read,

Source

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where Self: Sized, W: Write,

Source

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where Self: Sized, W: Write,

Implementations on Foreign Types§

Source§

impl BytesConvertible for f32

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for f64

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for i8

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for i16

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for i32

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for i64

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for u8

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for u16

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for u32

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

impl BytesConvertible for u64

Source§

fn read_bytes_be<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn read_bytes_le<R>(buf: &mut R) -> Result<Self>
where R: Read,

Source§

fn write_bytes_be<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Source§

fn write_bytes_le<W>(self, buf: &mut W) -> Result<usize>
where W: Write,

Implementors§