pub struct MemDecoder<'a> {
    pub data: &'a [u8],
    position: usize,
}

Fields§

§data: &'a [u8]§position: usize

Implementations§

source§

impl<'a> MemDecoder<'a>

source

pub fn new(data: &'a [u8], position: usize) -> MemDecoder<'a>

source

pub fn position(&self) -> usize

source

pub fn set_position(&mut self, pos: usize)

source

pub fn advance(&mut self, bytes: usize)

Trait Implementations§

source§

impl<'a> Decodable<MemDecoder<'a>> for IntEncodedWithFixedSize

source§

impl<'a> Decodable<MemDecoder<'a>> for Vec<u8>

source§

fn decode(d: &mut MemDecoder<'a>) -> Self

source§

impl<'a> Decoder for MemDecoder<'a>

source§

fn read_u128(&mut self) -> u128

source§

fn read_u64(&mut self) -> u64

source§

fn read_u32(&mut self) -> u32

source§

fn read_u16(&mut self) -> u16

source§

fn read_u8(&mut self) -> u8

source§

fn read_usize(&mut self) -> usize

source§

fn read_i128(&mut self) -> i128

source§

fn read_i64(&mut self) -> i64

source§

fn read_i32(&mut self) -> i32

source§

fn read_i16(&mut self) -> i16

source§

fn read_i8(&mut self) -> i8

source§

fn read_isize(&mut self) -> isize

source§

fn read_bool(&mut self) -> bool

source§

fn read_f64(&mut self) -> f64

source§

fn read_f32(&mut self) -> f32

source§

fn read_char(&mut self) -> char

source§

fn read_str(&mut self) -> &'a str

source§

fn read_raw_bytes(&mut self, bytes: usize) -> &'a [u8]

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for MemDecoder<'a>

§

impl<'a> Send for MemDecoder<'a>

§

impl<'a> Sync for MemDecoder<'a>

§

impl<'a> Unpin for MemDecoder<'a>

§

impl<'a> UnwindSafe for MemDecoder<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes