Expand description
Implementations
sourceimpl<R: AsyncRead + AsyncSeek + Unpin> Archive<R>
impl<R: AsyncRead + AsyncSeek + Unpin> Archive<R>
sourcepub fn reader_mut(&mut self) -> &mut R
pub fn reader_mut(&mut self) -> &mut R
Returns mutable reference to its inner reader.
It is mostly OK to seek the reader’s cursor, since every time accessing
its file will reset the cursor to the file’s position. However, write
access will compromise Archive’s functionality. Use with great care!
sourcepub fn into_reader(self) -> R
pub fn into_reader(self) -> R
Drops the inner state and returns the reader.
sourceimpl Archive<DuplicableFile>
impl Archive<DuplicableFile>
sourceimpl<R: AsyncRead + AsyncSeek + Duplicable + Unpin> Archive<R>
impl<R: AsyncRead + AsyncSeek + Duplicable + Unpin> Archive<R>
sourcepub async fn get_owned(&self, path: &str) -> Result<File<R>>
pub async fn get_owned(&self, path: &str) -> Result<File<R>>
Returns a file from the archive by duplicating the inner reader.
Contrary to [Archive::read], it allows multiple read access over a single
archive by creating a new file handle for every file. Useful when building a
virtual file system like how Electron does.
sourceimpl<R: AsyncRead + AsyncSeek + LocalDuplicable + Unpin> Archive<R>
impl<R: AsyncRead + AsyncSeek + LocalDuplicable + Unpin> Archive<R>
sourcepub async fn get_owned_local(&self, path: &str) -> Result<File<R>>
pub async fn get_owned_local(&self, path: &str) -> Result<File<R>>
Returns a file from the archive by duplicating the inner reader, without Sync.
See [Archive::read_owned] for more information.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for Archive<R> where
R: RefUnwindSafe,
impl<R> Send for Archive<R> where
R: Send,
impl<R> Sync for Archive<R> where
R: Sync,
impl<R> Unpin for Archive<R>
impl<R> UnwindSafe for Archive<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more