Enum rc_zip::parse::ExtraField

source ·
pub enum ExtraField<'a> {
    Zip64(ExtraZip64Field),
    Timestamp(ExtraTimestampField),
    Unix(ExtraUnixField<'a>),
    NewUnix(ExtraNewUnixField),
    Ntfs(ExtraNtfsField),
    Unknown {
        tag: u16,
    },
}
Expand description

Information stored in the central directory header extra field

This typically contains timestamps, file sizes and offsets, file mode, uid/gid, etc.

See extrafld.txt in this crate’s source distribution.

Variants§

§

Zip64(ExtraZip64Field)

Zip64 extended information extra field

§

Timestamp(ExtraTimestampField)

Extended timestamp

§

Unix(ExtraUnixField<'a>)

UNIX & Info-Zip UNIX

§

NewUnix(ExtraNewUnixField)

New UNIX extra field

§

Ntfs(ExtraNtfsField)

NTFS (Win9x/WinNT FileTimes)

§

Unknown

Fields

§tag: u16

tag of the extra field

Unknown extra field, with tag

Implementations§

source§

impl<'a> ExtraField<'a>

source

pub fn mk_parser( settings: ExtraFieldSettings ) -> impl FnMut(&mut Partial<&'a [u8]>) -> PResult<Self>

Make a parser for extra fields, given the settings for the zip64 extra field (which depend on whether the u32 values are 0xFFFF_FFFF or not)

Trait Implementations§

source§

impl<'a> Clone for ExtraField<'a>

source§

fn clone(&self) -> ExtraField<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ExtraField<'a>

§

impl<'a> RefUnwindSafe for ExtraField<'a>

§

impl<'a> Send for ExtraField<'a>

§

impl<'a> Sync for ExtraField<'a>

§

impl<'a> Unpin for ExtraField<'a>

§

impl<'a> UnwindSafe for ExtraField<'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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more