pub struct TableEntry { /* private fields */ }Expand description
A single entry in a PAK Table. Each entry is 64 bytes in size.
Implementations§
Source§impl TableEntry
impl TableEntry
Sourcepub fn new(path: String, offset: u32, size: u32) -> Result<Self>
pub fn new(path: String, offset: u32, size: u32) -> Result<Self>
Will throw an Error::FilenameTooLong if the path is greater than 56 characters
Sourcepub async fn read<R>(reader: &mut R) -> Result<Self>
pub async fn read<R>(reader: &mut R) -> Result<Self>
Reads a table entry from a (buffered) reader.
Sourcepub fn read_sync<R>(reader: &mut R) -> Result<Self>where
R: Read,
pub fn read_sync<R>(reader: &mut R) -> Result<Self>where
R: Read,
Reads a table entry from a (buffered) reader.
Sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
Retrieves the path of a table entry as a String. Its stored format is a fixed 56 byte null-terminated UTF-8 string.
Trait Implementations§
Source§impl Clone for TableEntry
impl Clone for TableEntry
Source§fn clone(&self) -> TableEntry
fn clone(&self) -> TableEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TableEntry
impl RefUnwindSafe for TableEntry
impl Send for TableEntry
impl Sync for TableEntry
impl Unpin for TableEntry
impl UnsafeUnpin for TableEntry
impl UnwindSafe for TableEntry
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