wildcard-glob 11.2.0

Zero-dependency, zero-allocation compiled wildcard and path glob pattern matcher supporting *, **, ?, character classes, brace alternation, and multi-pattern GlobSet.
Documentation
use super::*;

/// Lightweight non-cryptographic FNV-1a hasher for fast exact-literal lookups.
#[derive(Clone, Copy, Debug)]
pub(crate) struct FastHasher {
    /// Running 64-bit hash state.
    pub(crate) state: u64,
}

/// Zero-size [`BuildHasher`] producing [`FastHasher`] instances.
#[derive(Clone, Copy, Debug, Default)]
pub(crate) struct FastBuildHasher;

/// High-throughput multi-pattern glob set with O(1) length-gated exact-literal fast path.
#[derive(Clone, Debug)]
pub struct GlobSet {
    /// Fast exact-literal lookup table for wildcard-free patterns.
    pub(crate) exact: HashSet<String, FastBuildHasher>,
    /// Minimum byte length among exact literals (`usize::MAX` when empty).
    pub(crate) min_exact_len: usize,
    /// Maximum byte length among exact literals (`0` when empty).
    pub(crate) max_exact_len: usize,
    /// Number of non-exact patterns inserted into this set.
    pub(crate) wildcard_count: usize,
    /// Contiguous flattened wildcard branches `(branch, path_aware)`.
    pub(crate) branches: Vec<(CompiledBranch, bool)>,
}