[−][src]Struct unrpa_rs::rpa::RenpyArchive
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 path(&self) -> &Path
[src]
pub fn read_file_from_archive<S: AsRef<str>>(
&mut self,
filename: S
) -> Result<Vec<u8>, Box<dyn Error>>
[src]
&mut self,
filename: S
) -> Result<Vec<u8>, Box<dyn Error>>
Reads the byte buffer of the specified file in the archive into memory
pub fn write_file<S: AsRef<str>>(
&mut self,
filepath: S,
file_buf: &[u8]
) -> Result<()>
[src]
&mut self,
filepath: S,
file_buf: &[u8]
) -> Result<()>
Writes the byte buffer of one file to disk
pub fn estimate_overall_write_speed(&self) -> f32
[src]
Calculates an estimation of the overall write speed, in MB/s.
pub fn total_bytes_written(&self) -> usize
[src]
Returns the total amount of bytes written to disk
pub fn total_bytes_written_duration(&self) -> &Duration
[src]
Returns the duration it took to write all bytes to disk
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,