[−][src]Struct binary_reader::BinaryReader
Fields
data: Vec<u8>
pos: usize
length: usize
endian: Endian
Implementations
impl BinaryReader
[src]
pub fn from_u8(get: &[u8]) -> BinaryReader
[src]
Initialize BinaryReader from u8 slice.
pub fn from_vec(vec: &Vec<u8>) -> BinaryReader
[src]
Initialize BinaryReader from u8 Vector.
pub fn from_file(file: &mut File) -> BinaryReader
[src]
Initialize BinaryReader from std::fs::File
.
pub fn set_endian(&mut self, endian: Endian)
[src]
Set endian for read method.
pub fn jmp(&mut self, pos: usize)
[src]
jump position.
pub fn adv(&mut self, size: usize)
[src]
pub fn align(&mut self, size: usize)
[src]
pub fn read(&mut self, size: usize) -> Option<&[u8]>
[src]
Read length size bytes.
pub fn read_cstr(&mut self) -> String
[src]
Read cstr.
Read String(s) until null
(aka 0x00
).
pub fn read_i8(&mut self) -> Result<i8>
[src]
read signed 8 bit integer
pub fn read_i16(&mut self) -> Result<i16>
[src]
read signed 16 bit integer
pub fn read_i32(&mut self) -> Result<i32>
[src]
read signed 32 bit integer
pub fn read_i64(&mut self) -> Result<i64>
[src]
read signed 64 bit integer
pub fn read_f32(&mut self) -> Result<f32>
[src]
read 32 bit float
pub fn read_f64(&mut self) -> Result<f64>
[src]
read 64 bit float
pub fn read_u8(&mut self) -> Result<u8>
[src]
read unsigned 8 bit integer
pub fn read_u16(&mut self) -> Result<u16>
[src]
read unsigned 16 bit integer
pub fn read_u32(&mut self) -> Result<u32>
[src]
read unsigned 32 bit integer
pub fn read_u64(&mut self) -> Result<u64>
[src]
read unsigned 64 bit integer
Auto Trait Implementations
impl RefUnwindSafe for BinaryReader
impl Send for BinaryReader
impl Sync for BinaryReader
impl Unpin for BinaryReader
impl UnwindSafe for BinaryReader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,