[−][src]Struct axfive_libzip::archive::Archive
Implementations
impl Archive
[src]
pub fn open<S, F>(source: Source<S>, flags: F) -> Result<Archive> where
F: AsRef<[OpenFlag]>,
[src]
F: AsRef<[OpenFlag]>,
pub fn close(self) -> Result<(), (Self, Error)>
[src]
Closes and consumes a zip file. If this fails, the failed-to-close zipfile and an error will be returned.
pub fn discard(self)
[src]
Discard and consume the zipfile. This will never fail.
pub fn add<N, S>(
&mut self,
name: N,
source: Source<S>,
encoding: Encoding,
overwrite: bool
) -> Result<u64> where
N: AsRef<CStr>,
[src]
&mut self,
name: N,
source: Source<S>,
encoding: Encoding,
overwrite: bool
) -> Result<u64> where
N: AsRef<CStr>,
Add a file to the zip archive. Returns the index of the new file.
pub fn replace<S>(&mut self, index: u64, source: Source<S>) -> Result<()>
[src]
Replace a file in the zip archive.
pub fn open_file<N, O, L>(
&mut self,
name: N,
open_flags: O,
locate_flags: L
) -> Result<File<'_>> where
N: AsRef<CStr>,
O: AsRef<[FileOpenFlag]>,
L: AsRef<[LocateFlag]>,
[src]
&mut self,
name: N,
open_flags: O,
locate_flags: L
) -> Result<File<'_>> where
N: AsRef<CStr>,
O: AsRef<[FileOpenFlag]>,
L: AsRef<[LocateFlag]>,
Add a file to the zip archive. Returns the index of the new file.
Trait Implementations
impl Debug for Archive
[src]
impl Drop for Archive
[src]
Closes the archive, silently discarding on error. It's strongly recommended to use the Archive::close method instead and validate that no errors have occurred.
Auto Trait Implementations
impl RefUnwindSafe for Archive
impl !Send for Archive
impl !Sync for Archive
impl Unpin for Archive
impl UnwindSafe for Archive
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,