pub struct Archive { /* private fields */ }
Implementations§
Source§impl Archive
impl Archive
pub fn open<S, F>(source: Source<S>, flags: F) -> Result<Archive>
Sourcepub fn close(self) -> Result<(), (Self, Error)>
pub fn close(self) -> Result<(), (Self, Error)>
Closes and consumes a zip file. If this fails, the failed-to-close zipfile and an error will be returned.
Sourcepub fn add<N, S>(
&mut self,
name: N,
source: Source<S>,
encoding: Encoding,
overwrite: bool,
) -> Result<u64>
pub fn add<N, S>( &mut self, name: N, source: Source<S>, encoding: Encoding, overwrite: bool, ) -> Result<u64>
Add a file to the zip archive. Returns the index of the new file.
Sourcepub fn replace<S>(&mut self, index: u64, source: Source<S>) -> Result<()>
pub fn replace<S>(&mut self, index: u64, source: Source<S>) -> Result<()>
Replace a file in the zip archive.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Archive
impl RefUnwindSafe for Archive
impl !Send for Archive
impl !Sync for Archive
impl Unpin for Archive
impl UnwindSafe for Archive
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