zip/extra_fields/
mod.rs

1//! types for extra fields
2
3/// marker trait to denote the place where this extra field has been stored
4pub trait ExtraFieldVersion {}
5
6/// use this to mark extra fields specified in a local header
7
8#[derive(Debug, Clone)]
9pub struct LocalHeaderVersion;
10
11/// use this to mark extra fields specified in the central header
12
13#[derive(Debug, Clone)]
14pub struct CentralHeaderVersion;
15
16impl ExtraFieldVersion for LocalHeaderVersion {}
17impl ExtraFieldVersion for CentralHeaderVersion {}
18
19mod extended_timestamp;
20mod ntfs;
21mod zipinfo_utf8;
22
23pub use extended_timestamp::*;
24pub use ntfs::Ntfs;
25pub use zipinfo_utf8::*;
26
27/// contains one extra field
28#[derive(Debug, Clone)]
29pub enum ExtraField {
30    /// NTFS extra field
31    Ntfs(Ntfs),
32
33    /// extended timestamp, as described in <https://libzip.org/specifications/extrafld.txt>
34    ExtendedTimestamp(ExtendedTimestamp),
35}