[][src]Struct unrpa_rs::rpa::RenpyArchive

pub struct RenpyArchive<'a> { /* fields omitted */ }

Represents the Renpy archive format

Implementations

impl<'a> RenpyArchive<'a>[src]

pub fn from_file(path: &'a Path) -> Result<Self, Box<dyn Error>>[src]

Construct a RenpyArchive from a file on the filesystem

This performs I/O operations as it reads the magic literal and the rest of the file to decode the indices present in the archive.

Errors

An error occurs if either an invalid path has been provided to the OS, I/O errors occurs during reading the file, the zlib decoding fails, or the serde deserialization process fails.

Panics

This function panics if it either encounters an unsupported RpaVersion, i.e. a variant not covered in the enum declaration, or the integer parsing while constructing the obfuscation key fails.

pub fn indices_map(&self) -> &RpaIdxColl[src]

Method to get access to the collection data structure of RpaIdx

pub fn list_indices(&self) -> Vec<String>[src]

Lists all the files present in one archive

pub fn read_file_from_archive<S: AsRef<str>>(
    &mut self,
    filename: S
) -> Result<Vec<u8>, Box<dyn Error>>
[src]

Reads the byte buffer of the specified file in the archive into memory

pub fn write_file<S: AsRef<str>>(
    &self,
    filepath: S,
    file_buf: &[u8]
) -> Result<()>
[src]

Writes the byte buffer of one file to disk

Trait Implementations

impl<'a> Debug for RenpyArchive<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for RenpyArchive<'a>

impl<'a> Send for RenpyArchive<'a>

impl<'a> Sync for RenpyArchive<'a>

impl<'a> Unpin for RenpyArchive<'a>

impl<'a> UnwindSafe for RenpyArchive<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.