pub struct BufferReader {
pub buffer: Vec<u8>,
/* private fields */
}Expand description
A basic buffer reader for reading data from a buffer
Implements the Reader trait.
Fields§
§buffer: Vec<u8>The buffer
Implementations§
Trait Implementations§
Source§impl Clone for BufferReader
impl Clone for BufferReader
Source§fn clone(&self) -> BufferReader
fn clone(&self) -> BufferReader
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BufferReader
impl Debug for BufferReader
Source§impl Default for BufferReader
impl Default for BufferReader
Source§fn default() -> BufferReader
fn default() -> BufferReader
Returns the “default value” for a type. Read more
Source§impl From<&[u8]> for BufferReader
impl From<&[u8]> for BufferReader
Source§impl PartialEq for BufferReader
impl PartialEq for BufferReader
Source§impl Reader for BufferReader
impl Reader for BufferReader
Source§fn uint64(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> u64
fn uint64(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> u64
Get the unsigned 64 bit integer at the given byte offset and endian. Default to big-endian
Source§fn uint64_be(&self, byte_offset: Option<u64>) -> u64
fn uint64_be(&self, byte_offset: Option<u64>) -> u64
Get the big-endian unsigned 64 bit integer at the given byte offset
Source§fn uint64_le(&self, byte_offset: Option<u64>) -> u64
fn uint64_le(&self, byte_offset: Option<u64>) -> u64
Get the little-endian unsigned 64 bit integer at the given byte offset
Source§fn int64(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> i64
fn int64(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> i64
Get the signed 64 bit integer at the given byte offset and endian. Default to big-endian
Source§fn int64_be(&self, byte_offset: Option<u64>) -> i64
fn int64_be(&self, byte_offset: Option<u64>) -> i64
Get the big-endian signed 64 bit integer at the given byte offset
Source§fn int64_le(&self, byte_offset: Option<u64>) -> i64
fn int64_le(&self, byte_offset: Option<u64>) -> i64
Get the little-endian signed 64 bit integer at the given byte offset
Source§fn f64(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> f64
fn f64(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> f64
Get the 64 bit floating point at the given byte offset and endian. Default to big-endian
Source§fn f64_be(&self, byte_offset: Option<u64>) -> f64
fn f64_be(&self, byte_offset: Option<u64>) -> f64
Get the big-endian floating point 64 bit integer at the given byte offset
Source§fn f64_le(&self, byte_offset: Option<u64>) -> f64
fn f64_le(&self, byte_offset: Option<u64>) -> f64
Get the little-endian floating point 64 bit integer at the given byte offset
Source§fn uint32(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> u32
fn uint32(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> u32
Get the unsigned 32 bit integer at the given byte offset and endian. Default to big-endian
Source§fn uint32_be(&self, byte_offset: Option<u64>) -> u32
fn uint32_be(&self, byte_offset: Option<u64>) -> u32
Get the big-endian unsigned 32 bit integer at the given byte offset
Source§fn uint32_le(&self, byte_offset: Option<u64>) -> u32
fn uint32_le(&self, byte_offset: Option<u64>) -> u32
Get the little-endian unsigned 32 bit integer at the given byte offset
Source§fn int32(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> i32
fn int32(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> i32
Get the signed 32 bit integer at the given byte offset and endian. Default to big-endian
Source§fn int32_be(&self, byte_offset: Option<u64>) -> i32
fn int32_be(&self, byte_offset: Option<u64>) -> i32
Get the big-endian signed 32 bit integer at the given byte offset
Source§fn int32_le(&self, byte_offset: Option<u64>) -> i32
fn int32_le(&self, byte_offset: Option<u64>) -> i32
Get the little-endian signed 32 bit integer at the given byte offset
Source§fn f32(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> f32
fn f32(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> f32
Get the 32 bit floating point at the given byte offset and endian. Default to big-endian
Source§fn f32_be(&self, byte_offset: Option<u64>) -> f32
fn f32_be(&self, byte_offset: Option<u64>) -> f32
Get the big-endian floating point 32 bit integer at the given byte offset
Source§fn f32_le(&self, byte_offset: Option<u64>) -> f32
fn f32_le(&self, byte_offset: Option<u64>) -> f32
Get the little-endian floating point 32 bit integer at the given byte offset
Source§fn uint16(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> u16
fn uint16(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> u16
Get the unsigned 16 bit integer at the given byte offset and endian. Default to big-endian
Source§fn uint16_be(&self, byte_offset: Option<u64>) -> u16
fn uint16_be(&self, byte_offset: Option<u64>) -> u16
Get the big-endian unsigned 16 bit integer at the given byte offset
Source§fn uint16_le(&self, byte_offset: Option<u64>) -> u16
fn uint16_le(&self, byte_offset: Option<u64>) -> u16
Get the little-endian unsigned 16 bit integer at the given byte offset
Source§fn int16(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> i16
fn int16(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> i16
Get the signed 16 bit integer at the given byte offset and endian. Default to big-endian
Source§fn int16_be(&self, byte_offset: Option<u64>) -> i16
fn int16_be(&self, byte_offset: Option<u64>) -> i16
Get the big-endian signed 16 bit integer at the given byte offset
Source§fn int16_le(&self, byte_offset: Option<u64>) -> i16
fn int16_le(&self, byte_offset: Option<u64>) -> i16
Get the little-endian signed 16 bit integer at the given byte offset
Source§fn f16(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> f32
fn f16(&self, byte_offset: Option<u64>, little_endian: Option<bool>) -> f32
Get the 16 bit floating point at the given byte offset and endian. Default to big-endian
Source§fn f16_be(&self, byte_offset: Option<u64>) -> f32
fn f16_be(&self, byte_offset: Option<u64>) -> f32
Get the big-endian floating point 16 bit integer at the given byte offset
Source§fn f16_le(&self, byte_offset: Option<u64>) -> f32
fn f16_le(&self, byte_offset: Option<u64>) -> f32
Get the little-endian floating point 16 bit integer at the given byte offset
Source§fn uint8(&self, byte_offset: Option<u64>) -> u8
fn uint8(&self, byte_offset: Option<u64>) -> u8
Get the unsigned 8 bit integer at the given byte offset
Source§fn int8(&self, byte_offset: Option<u64>) -> i8
fn int8(&self, byte_offset: Option<u64>) -> i8
Get the signed 8 bit integer at the given byte offset
Source§fn seek_slice(&self, size: usize) -> Vec<u8> ⓘ
fn seek_slice(&self, size: usize) -> Vec<u8> ⓘ
Get a slice of the reader at the current position
impl StructuralPartialEq for BufferReader
Auto Trait Implementations§
impl !Freeze for BufferReader
impl !RefUnwindSafe for BufferReader
impl Send for BufferReader
impl !Sync for BufferReader
impl Unpin for BufferReader
impl UnwindSafe for BufferReader
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().