Docs

derive-classify

Source: crates/lvcs/src/derive.rs.

/// How row 179's classifier classified one path (decisions 172, 179, and
/// 180).
#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) struct Classification {
    /// Whether the file is derived.
    pub(crate) derived: bool,
    /// The rule that decided: `none` when no rule applies, and for a
    /// `NEVER_DERIVED` path.
    pub(crate) rule: DerivedRule,
    /// Whether the rule was an explicit negation (a `.gitattributes` unset
    /// or a the generator's `writes` `!` pattern), the one case a save carries
    /// `Unmark` (row 180).
    pub(crate) negated: bool,
    /// What matched, cut to `RANGE_CONTEXT_MAX_CHARS` code points: the
    /// `.gitattributes` line as `<file>:<line>: <text>`, the `lvcs.toml`
    /// pattern, the `DERIVED_PATTERNS` or `NEVER_DERIVED` pattern, or the
    /// marker; empty when no rule applies.
    pub(crate) detail: String,
}