Skip to main content

PendingMember

Struct PendingMember 

Source
pub struct PendingMember<'a> { /* private fields */ }
Expand description

Validated metadata for a ZIP64 member awaiting its final CRC and sizes.

Once the payload’s CRC and sizes are known, Self::finish produces a CompletedMember that can serialize the local and central headers.

Implementations§

Source§

impl<'a> PendingMember<'a>

Source

pub fn new( path: &'a str, method: CompressionMethod, kind: EntryKind, ) -> Result<Self, Error>

Checks the path and method before any output is written.

Enforces the APPNOTE 4.4.10 through 4.4.12 recommendation of at most 65,535 bytes per central-directory entry.

Source

pub fn method(&self) -> CompressionMethod

Returns the payload compression method.

Source

pub fn local_header_size(&self) -> usize

Returns the space to reserve for the completed local header.

Source

pub fn central_header_size(&self) -> usize

Returns the central header size in bytes, including the filename and ZIP64 extra field.

Source

pub fn finish( self, crc: u32, compressed: u64, uncompressed: u64, offset: u64, ) -> Result<CompletedMember<'a>, Error>

Completes metadata after the payload’s CRC and sizes are known.

Auto Trait Implementations§

§

impl<'a> Forget for PendingMember<'a>

§

impl<'a> Freeze for PendingMember<'a>

§

impl<'a> Move for PendingMember<'a>

§

impl<'a> RefUnwindSafe for PendingMember<'a>

§

impl<'a> Send for PendingMember<'a>

§

impl<'a> Sync for PendingMember<'a>

§

impl<'a> Unpin for PendingMember<'a>

§

impl<'a> UnsafeUnpin for PendingMember<'a>

§

impl<'a> UnwindSafe for PendingMember<'a>

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.