Struct yaxpeax_arch::U8Reader
source · [−]pub struct U8Reader<'a> { /* private fields */ }
Expand description
a struct for Reader
impls that can operate on units of u8
.
Implementations
Trait Implementations
sourceimpl Reader<u16, U16be> for U8Reader<'_>
impl Reader<u16, U16be> for U8Reader<'_>
fn next(&mut self) -> Result<U16be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U16be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U16be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u16
fn offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u16
fn total_offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u16, U16le> for U8Reader<'_>
impl Reader<u16, U16le> for U8Reader<'_>
fn next(&mut self) -> Result<U16le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U16le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U16le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u16
fn offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u16
fn total_offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u16, U32be> for U8Reader<'_>
impl Reader<u16, U32be> for U8Reader<'_>
fn next(&mut self) -> Result<U32be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U32be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U32be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u16
fn offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u16
fn total_offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u16, U32le> for U8Reader<'_>
impl Reader<u16, U32le> for U8Reader<'_>
fn next(&mut self) -> Result<U32le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U32le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U32le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u16
fn offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u16
fn total_offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u16, U64be> for U8Reader<'_>
impl Reader<u16, U64be> for U8Reader<'_>
fn next(&mut self) -> Result<U64be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U64be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U64be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u16
fn offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u16
fn total_offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u16, U64le> for U8Reader<'_>
impl Reader<u16, U64le> for U8Reader<'_>
fn next(&mut self) -> Result<U64le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U64le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U64le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u16
fn offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u16
fn total_offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u16, u8> for U8Reader<'_>
impl Reader<u16, u8> for U8Reader<'_>
fn next(&mut self) -> Result<u8, ReadError>
sourcefn next_n(&mut self, buf: &mut [u8]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [u8]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u16
fn offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u16
fn total_offset(&mut self) -> u16
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u32, U16be> for U8Reader<'_>
impl Reader<u32, U16be> for U8Reader<'_>
fn next(&mut self) -> Result<U16be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U16be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U16be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u32
fn offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u32
fn total_offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u32, U16le> for U8Reader<'_>
impl Reader<u32, U16le> for U8Reader<'_>
fn next(&mut self) -> Result<U16le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U16le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U16le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u32
fn offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u32
fn total_offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u32, U32be> for U8Reader<'_>
impl Reader<u32, U32be> for U8Reader<'_>
fn next(&mut self) -> Result<U32be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U32be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U32be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u32
fn offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u32
fn total_offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u32, U32le> for U8Reader<'_>
impl Reader<u32, U32le> for U8Reader<'_>
fn next(&mut self) -> Result<U32le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U32le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U32le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u32
fn offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u32
fn total_offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u32, U64be> for U8Reader<'_>
impl Reader<u32, U64be> for U8Reader<'_>
fn next(&mut self) -> Result<U64be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U64be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U64be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u32
fn offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u32
fn total_offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u32, U64le> for U8Reader<'_>
impl Reader<u32, U64le> for U8Reader<'_>
fn next(&mut self) -> Result<U64le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U64le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U64le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u32
fn offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u32
fn total_offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u32, u8> for U8Reader<'_>
impl Reader<u32, u8> for U8Reader<'_>
fn next(&mut self) -> Result<u8, ReadError>
sourcefn next_n(&mut self, buf: &mut [u8]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [u8]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u32
fn offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u32
fn total_offset(&mut self) -> u32
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u64, U16be> for U8Reader<'_>
impl Reader<u64, U16be> for U8Reader<'_>
fn next(&mut self) -> Result<U16be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U16be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U16be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u64
fn offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u64
fn total_offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u64, U16le> for U8Reader<'_>
impl Reader<u64, U16le> for U8Reader<'_>
fn next(&mut self) -> Result<U16le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U16le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U16le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u64
fn offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u64
fn total_offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u64, U32be> for U8Reader<'_>
impl Reader<u64, U32be> for U8Reader<'_>
fn next(&mut self) -> Result<U32be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U32be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U32be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u64
fn offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u64
fn total_offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u64, U32le> for U8Reader<'_>
impl Reader<u64, U32le> for U8Reader<'_>
fn next(&mut self) -> Result<U32le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U32le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U32le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u64
fn offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u64
fn total_offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u64, U64be> for U8Reader<'_>
impl Reader<u64, U64be> for U8Reader<'_>
fn next(&mut self) -> Result<U64be, ReadError>
sourcefn next_n(&mut self, buf: &mut [U64be]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U64be]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u64
fn offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u64
fn total_offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u64, U64le> for U8Reader<'_>
impl Reader<u64, U64le> for U8Reader<'_>
fn next(&mut self) -> Result<U64le, ReadError>
sourcefn next_n(&mut self, buf: &mut [U64le]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [U64le]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u64
fn offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u64
fn total_offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moresourceimpl Reader<u64, u8> for U8Reader<'_>
impl Reader<u64, u8> for U8Reader<'_>
fn next(&mut self) -> Result<u8, ReadError>
sourcefn next_n(&mut self, buf: &mut [u8]) -> Result<(), ReadError>
fn next_n(&mut self, buf: &mut [u8]) -> Result<(), ReadError>
read
buf
-many items from this reader in bulk. if Reader
cannot read buf
-many items,
return ReadError::ExhaustedInput
. Read moresourcefn offset(&mut self) -> u64
fn offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and its last mark
.
when created, a Reader
’s initial position is mark
ed, so creating a Reader
and
immediately calling offset()
must return Address::zero()
. Read moresourcefn total_offset(&mut self) -> u64
fn total_offset(&mut self) -> u64
the difference, in
Address
, between the current Reader
position and the initial offset
when constructed. Read moreAuto Trait Implementations
impl<'a> RefUnwindSafe for U8Reader<'a>
impl<'a> !Send for U8Reader<'a>
impl<'a> !Sync for U8Reader<'a>
impl<'a> Unpin for U8Reader<'a>
impl<'a> UnwindSafe for U8Reader<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more