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 String

§

type Error = ()

source§

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

source§

impl FromBytes for bool

§

type Error = ()

source§

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

source§

impl FromBytes for u16

§

type Error = ()

source§

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

source§

impl FromBytes for i16

§

type Error = ()

source§

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

source§

impl FromBytes for i8

§

type Error = ()

source§

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

source§

impl FromBytes for f64

§

type Error = ()

source§

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

source§

impl FromBytes for i32

§

type Error = ()

source§

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

source§

impl FromBytes for u32

§

type Error = ()

source§

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

source§

impl FromBytes for u8

§

type Error = ()

source§

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

source§

impl FromBytes for f32

§

type Error = ()

source§

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

Implementors§