Skip to main content

WzBinaryReader

Struct WzBinaryReader 

Source
pub struct WzBinaryReader<R: Read + Seek> {
    pub wz_key: WzKey,
    pub hash: u32,
    pub header: WzHeader,
    pub start_offset: u64,
    /* private fields */
}

Fields§

§wz_key: WzKey§hash: u32§header: WzHeader§start_offset: u64

Implementations§

Source§

impl<R: Read + Seek> WzBinaryReader<R>

Source

pub fn new(reader: R, iv: [u8; 4], header: WzHeader, start_offset: u64) -> Self

Source

pub fn position(&mut self) -> WzResult<u64>

Source

pub fn seek(&mut self, pos: u64) -> WzResult<()>

Source

pub fn available(&mut self) -> WzResult<u64>

Source

pub fn read_u8(&mut self) -> WzResult<u8>

Source

pub fn read_u16(&mut self) -> WzResult<u16>

Source

pub fn read_i16(&mut self) -> WzResult<i16>

Source

pub fn read_u32(&mut self) -> WzResult<u32>

Source

pub fn read_i32(&mut self) -> WzResult<i32>

Source

pub fn read_i64(&mut self) -> WzResult<i64>

Source

pub fn read_f32(&mut self) -> WzResult<f32>

Source

pub fn read_f64(&mut self) -> WzResult<f64>

Source

pub fn read_i8(&mut self) -> WzResult<i8>

Source

pub fn read_bytes(&mut self, len: usize) -> WzResult<Vec<u8>>

Source

pub fn read_compressed_int(&mut self) -> WzResult<i32>

Source

pub fn read_compressed_long(&mut self) -> WzResult<i64>

Source

pub fn read_wz_string(&mut self) -> WzResult<String>

Source

pub fn read_string_at_offset(&mut self, offset: u64) -> WzResult<String>

Source

pub fn read_string_block(&mut self, offset: u64) -> WzResult<String>

Source

pub fn read_wz_offset(&mut self) -> WzResult<u64>

Auto Trait Implementations§

§

impl<R> Freeze for WzBinaryReader<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for WzBinaryReader<R>
where R: RefUnwindSafe,

§

impl<R> Send for WzBinaryReader<R>
where R: Send,

§

impl<R> Sync for WzBinaryReader<R>
where R: Sync,

§

impl<R> Unpin for WzBinaryReader<R>
where R: Unpin,

§

impl<R> UnsafeUnpin for WzBinaryReader<R>
where R: UnsafeUnpin,

§

impl<R> UnwindSafe for WzBinaryReader<R>
where R: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.