[−][src]Struct rpak::PakArchive
An in-memory representation of a PAK archive
Fields
files: Vec<(String, &'a [u8])>
Files contained within this archive
Implementations
impl<'a> PakArchive<'a>
[src]
pub fn new() -> Self
[src]
Create a new empty PAK archive.
pub fn add_file(&mut self, file_name: String, file_data: &'a [u8])
[src]
Add a file to the archive with the given file name, containing the given data.
pub fn from_bytes(data: &'a [u8]) -> Result<Self, ()>
[src]
Decode a PAK archive from an input byte slice.
Returns Err(())
if the PAK file header was invalid.
pub fn as_bytes(&self) -> Vec<u8>
[src]
Encode this archive representation into a byte vector.
Auto Trait Implementations
impl<'a> RefUnwindSafe for PakArchive<'a>
impl<'a> Send for PakArchive<'a>
impl<'a> Sync for PakArchive<'a>
impl<'a> Unpin for PakArchive<'a>
impl<'a> UnwindSafe for PakArchive<'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>,