Skip to main content

ReadZip

Trait ReadZip 

Source
pub trait ReadZip {
    type File: HasCursor;

    // Required method
    fn read_zip(&self) -> Result<ArchiveHandle<'_, Self::File>, Error>;
}
Expand description

A trait for reading something as a zip archive when we can tell size from self.

See also ReadZipWithSize.

Required Associated Types§

Source

type File: HasCursor

The type of the file to read from.

Required Methods§

Source

fn read_zip(&self) -> Result<ArchiveHandle<'_, Self::File>, Error>

Reads self as a zip archive.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ReadZip for &[u8]

Source§

type File = &[u8]

Source§

fn read_zip(&self) -> Result<ArchiveHandle<'_, Self::File>, Error>

Source§

impl ReadZip for File

Available on crate feature file only.
Source§

impl ReadZip for Vec<u8>

Implementors§