infinite_rs::module::file

Struct ModuleFileEntry

source
pub struct ModuleFileEntry {
    pub tag_group: String,
    pub tag_id: i32,
    pub data_stream: Option<BufReader<Cursor<Vec<u8>>>>,
    pub tag_info: Option<TagFile>,
    /* private fields */
}
Expand description

Module file entry structure containing metadata relating to file and required buffer sizes and offsets for the decompressor, as well as global tag ID, resource references and class.

Fields§

§tag_group: String

4 byte-long string for tag group, stored as big endian. This determines how the rest of the tag is read. Example:

  • bitm: Bitmap
  • mat: Material
§tag_id: i32

MurmurHash3_x86_64 32 bit hash of tag path. Referred to in-memory as “global tag id” Is set to -1 if file is resource.

§data_stream: Option<BufReader<Cursor<Vec<u8>>>>

Data stream containing a buffer of bytes to read/seek.

§tag_info: Option<TagFile>

The actual tag file read from the contents (including header), only valid if file is not a resource.

Trait Implementations§

source§

impl Debug for ModuleFileEntry

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ModuleFileEntry

source§

fn default() -> ModuleFileEntry

Returns the “default value” for a type. Read more
source§

impl Readable for ModuleFileEntry

source§

fn read<R>(&mut self, reader: &mut R) -> Result<(), Error>
where R: BufRead + BufReaderExt + Seek,

Reads data from the given reader and processes it. Read more

Auto Trait Implementations§

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, 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.