[][src]Struct axfive_libzip::archive::Archive

pub struct Archive { /* fields omitted */ }

Implementations

impl Archive[src]

pub fn open<S, F>(source: Source<S>, flags: F) -> Result<Archive> where
    F: AsRef<[OpenFlag]>, 
[src]

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.