Trait FromBytes

Source
pub trait FromBytes {
    type Error;

    // Required method
    fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

Allows a type to be converted from bytes from a BufferIterator to itself.

Required Associated Types§

Source

type Error

The error type returned when the conversion fails

Required Methods§

Source

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>
where Self: Sized,

Parses a value from the buffer iterator.

Implementations on Foreign Types§

Source§

impl FromBytes for bool

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for f32

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for f64

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for i8

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for i16

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for i32

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for u8

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for u16

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for u32

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Source§

impl FromBytes for String

Source§

type Error = ()

Source§

fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>

Implementors§