ReadCtx

Trait ReadCtx 

Source
pub trait ReadCtx<Ctx>
where Self: Sized,
{ // Required method fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: Ctx, ) -> Result<Self, ParserError>; }
Expand description

A trait for reading a non fixed amount of data, with context.

Required Methods§

Source

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: Ctx, ) -> Result<Self, ParserError>

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 ReadCtx<&Endian> for i8

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for i16

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for i32

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for i64

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for i128

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for u8

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for u16

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for u32

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for u64

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl ReadCtx<&Endian> for u128

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: &Endian, ) -> Result<Self, ParserError>

Source§

impl<T, Ctx> ReadCtx<Ctx> for Vec<T>
where T: ReadCtx<Ctx>, Ctx: Clone,

Available on crate feature non_fixed only.
Source§

fn from_bytes( data: &mut impl ExactSizeIterator<Item = u8>, ctx: Ctx, ) -> Result<Self, ParserError>

Implementors§