Struct TVFSHeader

Source
pub struct TVFSHeader {
Show 14 fields pub magic: [u8; 4], pub version: u8, pub header_size: u8, pub ekey_size: u8, pub patch_key_size: u8, pub flags: u8, pub path_table_offset: u64, pub path_table_size: u64, pub vfs_table_offset: u64, pub vfs_table_size: u64, pub cft_table_offset: u64, pub cft_table_size: u64, pub max_metafile_size: u16, pub build_version: u32,
}
Expand description

TVFS header structure

Fields§

§magic: [u8; 4]

Magic bytes “TVFS” (0x53465654)

§version: u8

Version (typically 1)

§header_size: u8

Header size in bytes (minimum 0x26 = 38 bytes)

§ekey_size: u8

EKey size (usually 9)

§patch_key_size: u8

Patch key size (usually 9)

§flags: u8

Flags (FileManifestFlags)

§path_table_offset: u64

Path table offset (40-bit integer)

§path_table_size: u64

Path table size (40-bit integer)

§vfs_table_offset: u64

VFS table offset (40-bit integer)

§vfs_table_size: u64

VFS table size (40-bit integer)

§cft_table_offset: u64

Container file table offset (40-bit integer)

§cft_table_size: u64

Container file table size (40-bit integer)

§max_metafile_size: u16

Maximum metafile size

§build_version: u32

Build version number

Implementations§

Source§

impl TVFSHeader

Source

pub fn parse<R: Read>(reader: &mut R) -> Result<Self>

Parse TVFS header

Source

pub fn has_ckey(&self) -> bool

Check if TVFS includes CKeys

Source

pub fn has_write_support(&self) -> bool

Check if TVFS has write support

Source

pub fn has_patch_support(&self) -> bool

Check if TVFS has patch support

Source

pub fn has_lowercase_paths(&self) -> bool

Check if TVFS forces lowercase paths

Trait Implementations§

Source§

impl Clone for TVFSHeader

Source§

fn clone(&self) -> TVFSHeader

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TVFSHeader

Source§

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

Formats the value using the given formatter. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more