1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#![cfg_attr(feature = "docsrs", feature(doc_cfg))]
#![warn(
    unused_results,
    unused_qualifications,
    variant_size_differences,
    clippy::checked_conversions,
    clippy::needless_borrow,
    clippy::shadow_unrelated,
    clippy::wrong_pub_self_convention
)]
#![deny(
    anonymous_parameters,
    bare_trait_objects,
    clippy::as_conversions,
    clippy::clone_on_ref_ptr,
    clippy::float_cmp_const,
    clippy::if_not_else,
    clippy::indexing_slicing,
    clippy::unwrap_used
)]
#![cfg_attr(
    debug_assertions,
    allow(
        dead_code,
        unused_imports,
        unused_variables,
        unreachable_code,
        unused_qualifications,
    )
)]
#![cfg_attr(not(debug_assertions), deny(warnings, missing_docs, clippy::dbg_macro))]
#![cfg_attr(not(debug_assertions), allow(clippy::unknown_clippy_lints))]

//! A library for reading and writing files of the PHP phar format.
//!
//! Currently, this library only supports read-only and write-only styles.

#[cfg(feature = "reader")]
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "reader")))]
pub use read::Reader;

#[cfg(feature = "reader")]
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "reader")))]
pub mod read;

#[cfg(feature = "writer")]
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "writer")))]
pub use write::create;

#[cfg(feature = "writer")]
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "writer")))]
pub mod write;

mod signature;
pub use signature::Signature;

mod compression;
pub use compression::Compression;

mod util;