Skip to main content

CiaMetadata

Struct CiaMetadata 

Source
pub struct CiaMetadata {
    pub archive_header_size: u32,
    pub type_: u16,
    pub version: u16,
    pub certificate_chain_size: u32,
    pub ticket_size: u32,
    pub tmd_file_size: u32,
    pub meta_size: u32,
    pub content_size: u64,
    pub content_index: Vec<u8>,
}
Expand description

CIA container metadata.

Cia containers have the following sections in order:

Each section starts aligned to 64 bytes.

Fields§

§archive_header_size: u32

The size of the header (usually 0x2020 bytes).

§type_: u16

The type of content (?).

§version: u16

The version of CIA.

§certificate_chain_size: u32

The size of the certificate chain in bytes.

§ticket_size: u32

The ticket size.

§tmd_file_size: u32

Tile metadata (TMD) file size in bytes.

§meta_size: u32

Meta size in bytes. 0 if no Meta is present.

§content_size: u64

The size of the Content.

§content_index: Vec<u8>

The content index (every byte corresponds to some Content).

Implementations§

Source§

impl CiaMetadata

Source

pub fn try_from<T: Read + Seek>(io: &mut T) -> Result<Self, Error>

Returns a new instance of a Cia container.

§Errors

See CiaRead::read_cia_metadata for possible errors.

Trait Implementations§

Source§

impl Debug for CiaMetadata

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