pub struct AsyncUtf8Reader<T>{ /* private fields */ }
Expand description
A struct to open and read a FAR-formatted archive asynchronously. Requires that all paths are valid UTF-8.
Implementations§
Source§impl<T> AsyncUtf8Reader<T>
impl<T> AsyncUtf8Reader<T>
Sourcepub async fn new(source: T) -> Result<Self, Error>
pub async fn new(source: T) -> Result<Self, Error>
Create a new AsyncUtf8Reader for the provided source.
Sourcepub fn list(&self) -> impl ExactSizeIterator<Item = Utf8Entry<'_>>
pub fn list(&self) -> impl ExactSizeIterator<Item = Utf8Entry<'_>>
Return a list of the items in the archive.
Sourcepub async fn read_file(&mut self, path: &str) -> Result<Vec<u8>, Error>
pub async fn read_file(&mut self, path: &str) -> Result<Vec<u8>, Error>
Read the entire contents of an entry with the specified path. O(log(# directory entries))
pub fn into_source(self) -> T
Trait Implementations§
Source§impl<T> Debug for AsyncUtf8Reader<T>
impl<T> Debug for AsyncUtf8Reader<T>
Auto Trait Implementations§
impl<T> Freeze for AsyncUtf8Reader<T>where
T: Freeze,
impl<T> RefUnwindSafe for AsyncUtf8Reader<T>where
T: RefUnwindSafe,
impl<T> Send for AsyncUtf8Reader<T>where
T: Send,
impl<T> Sync for AsyncUtf8Reader<T>where
T: Sync,
impl<T> Unpin for AsyncUtf8Reader<T>
impl<T> UnwindSafe for AsyncUtf8Reader<T>where
T: UnwindSafe,
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