Struct WadEntry

Source
pub struct WadEntry {
    pub id: u32,
    pub offset: u32,
    pub length: u32,
    pub path: String,
    pub created: NaiveDateTime,
    pub accessed: NaiveDateTime,
    pub written: NaiveDateTime,
}
Expand description

A Wad entry with a file’s metadata and the location of its contents.

§Format Description

The entries start at the header’s first entry offset and are repeated until the entry count.

FieldTypeByte SizeDescription
Unknown[16; u8]16(Maybe hash-related.)
File Idu324Index number. (This is implicit tho lol?)
Unknownu324
File sizeu324File size in the blob.
File offsetu324File offset in the blob.
Unknownu324
Path sizeu324Size of the path string that follows.
Path stringStringPath sizeFile path
Unknown[16; u8]16(Maybe some kind of metadata like perms.)
Created[7; u32]28Creation timestamp.
Accessed[7; u32]28Access timestamp.
Written[5; u32]20Write timestamp.

§Timestamps

This describes the “created” and “accessed” fields. The “written” field is similar but only percise to minutes.

FieldTypeByte Size
Yearu324
Monthu324
Dayu324
Houru324
Minuteu324
Secondu324
Millisecondu324

Fields§

§id: u32§offset: u32§length: u32§path: String§created: NaiveDateTime§accessed: NaiveDateTime§written: NaiveDateTime

Trait Implementations§

Source§

impl Debug for WadEntry

Source§

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

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

impl Entry for WadEntry

Source§

fn len(&self) -> u64

Source§

fn pos(&self) -> u64

Source§

fn reader<'a, Source: Read + Seek>( &mut self, source: &'a mut Source, ) -> Result<Take<&'a mut Source>, Error>

Creates a reader for the entry for further decoding. Read more
Source§

impl PartialEq for WadEntry

Source§

fn eq(&self, other: &WadEntry) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for WadEntry

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.