Struct zip::unstable::stream::ZipStreamReader

source ·
pub struct ZipStreamReader<R>(/* private fields */);
Expand description

Stream decoder for zip.

Implementations§

source§

impl<R> ZipStreamReader<R>

source

pub const fn new(reader: R) -> Self

Create a new ZipStreamReader

source§

impl<R: Read> ZipStreamReader<R>

source

pub fn visit<V: ZipStreamVisitor>(self, visitor: &mut V) -> ZipResult<()>

Iteraate over the stream and extract all file and their metadata.

source

pub fn extract<P: AsRef<Path>>(self, directory: P) -> ZipResult<()>

Extract a Zip archive into a directory, overwriting files if they already exist. Paths are sanitized with ZipFile::enclosed_name.

Extraction is not atomic; If an error is encountered, some of the files may be left on disk.

Trait Implementations§

source§

impl<R: Debug> Debug for ZipStreamReader<R>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<R> Freeze for ZipStreamReader<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for ZipStreamReader<R>
where R: RefUnwindSafe,

§

impl<R> Send for ZipStreamReader<R>
where R: Send,

§

impl<R> Sync for ZipStreamReader<R>
where R: Sync,

§

impl<R> Unpin for ZipStreamReader<R>
where R: Unpin,

§

impl<R> UnwindSafe for ZipStreamReader<R>
where R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.