zipatch-rs 1.6.0

Parser for FFXIV ZiPatch patch files
Documentation
//! Canonical [`tracing`] span and event names emitted by the library.
//!
//! Centralised so a rename lands in one file and the `SemVer` impact of
//! changing a public-surface name is obvious from the diff. The crate-level
//! `# Tracing` section in [`lib.rs`](crate) documents the catalog plus the
//! stability contract; this module is the source of truth the emission
//! sites resolve against.
//!
//! Field names are intentionally **not** centralised: they appear at a
//! single emission site each, and the `tracing` macro syntax for
//! const-named fields (`{ FIELD_NAME } = ...`) clutters the call site
//! without a corresponding rename-cost benefit. The contract section in
//! `lib.rs` enumerates the stable field names directly.
//!
//! [`tracing`]: https://docs.rs/tracing

/// Top-level (`info!`-level) and per-target (`debug!`-level) span names.
///
/// Every value is a `'static` string suitable for use as the first argument
/// to [`tracing::info_span!`] / [`tracing::debug_span!`]. The macro accepts
/// a `const &str` in name position and emits the same metadata as a string
/// literal would.
pub(crate) mod span_names {
    /// Top-level span around [`ApplyConfig::apply_patch`](crate::ApplyConfig::apply_patch).
    pub const APPLY_PATCH: &str = "apply_patch";
    /// Top-level span around
    /// [`ApplyConfig::resume_apply_patch`](crate::ApplyConfig::resume_apply_patch).
    pub const RESUME_APPLY_PATCH: &str = "resume_apply_patch";
    /// Top-level span around
    /// [`IndexApplier::execute`](crate::index::IndexApplier::execute) and
    /// [`IndexApplier::execute_with_manifest`](crate::index::IndexApplier::execute_with_manifest).
    /// The `resume_execute` path uses [`RESUME_EXECUTE`] instead.
    pub const APPLY_PLAN: &str = "apply_plan";
    /// Top-level span around
    /// [`IndexApplier::resume_execute`](crate::index::IndexApplier::resume_execute).
    pub const RESUME_EXECUTE: &str = "resume_execute";
    /// Top-level span around
    /// [`PlanBuilder::add_patch`](crate::index::PlanBuilder::add_patch).
    pub const BUILD_PLAN_PATCH: &str = "build_plan_patch";
    /// Top-level span around [`Plan::with_crc32`](crate::index::Plan::with_crc32).
    pub const WITH_CRC32: &str = "with_crc32";
    /// Top-level span around
    /// [`PlanVerifier::execute`](crate::index::PlanVerifier::execute).
    pub const VERIFY_PLAN: &str = "verify_plan";
    /// Top-level span around
    /// [`HashVerifier::execute`](crate::verify::HashVerifier::execute).
    pub const VERIFY_HASHES: &str = "verify_hashes";

    /// Per-target sub-span entered inside [`APPLY_PLAN`] / [`RESUME_EXECUTE`].
    pub const APPLY_TARGET: &str = "apply_target";
    /// Per-target sub-span entered inside [`VERIFY_PLAN`].
    pub const VERIFY_TARGET: &str = "verify_target";
    /// Per-file sub-span entered inside [`VERIFY_HASHES`].
    pub const VERIFY_FILE: &str = "verify_file";
}