pub struct Rff {
data: Vec<u8>,
pub version: u16,
pub entries: Vec<RffEntry>,
by_name: HashMap<String, usize>,
by_id: HashMap<(String, u32), usize>,
}Fields§
§data: Vec<u8>§version: u16§entries: Vec<RffEntry>§by_name: HashMap<String, usize>§by_id: HashMap<(String, u32), usize>Implementations§
Source§impl Rff
impl Rff
pub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn from_bytes(data: Vec<u8>) -> Result<Self>
pub fn find(&self, file_name: &str) -> Option<&RffEntry>
pub fn find_id(&self, ext: &str, id: u32) -> Option<&RffEntry>
Sourcepub fn read(&self, entry: &RffEntry) -> Result<Vec<u8>>
pub fn read(&self, entry: &RffEntry) -> Result<Vec<u8>>
Returns the decrypted contents of an entry.
pub fn read_name(&self, file_name: &str) -> Option<Vec<u8>>
pub fn read_id(&self, ext: &str, id: u32) -> Option<Vec<u8>>
Auto Trait Implementations§
impl Freeze for Rff
impl RefUnwindSafe for Rff
impl Send for Rff
impl Sync for Rff
impl Unpin for Rff
impl UnsafeUnpin for Rff
impl UnwindSafe for Rff
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more