pub struct SarcWriter {
    pub files: IndexMap<String, Vec<u8>>,
    /* private fields */
}
Expand description

A simple SARC archive writer

Fields

files: IndexMap<String, Vec<u8>>

Files to be written.

Implementations

A simple SARC archive writer

Creates a new SARC writer by taking attributes and files from an existing SARC reader

Write a SARC archive to an in-memory buffer using the specified endianness. Default alignment requirements may be automatically added.

Write a SARC archive to a Write + Seek writer using the specified endianness. Default alignment requirements may be automatically added.

Add or modify a data alignment requirement for a file type. Set the alignment to 1 to revert.

Arguments
  • ext - File extension without the dot (e.g. “bgparamlist”)
  • alignment - Data alignment (must be a power of 2)

Set the minimum data alignment

Set whether to use legacy mode (for games without a BOTW-style resource system) for addtional alignment restrictions

Set the endianness

Checks if a data slice represents a SARC archive

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.