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
//! Indicators (match rules) and the [`Match`] result type.
use ;
use fmt;
/// A single match rule evaluated against a directory's listing.
///
/// Indicators are OR'd within a [`crate::ProjectType`]: the first one that
/// fires identifies the directory as that type. The variant determines what
/// the rule sees:
///
/// - [`Indicator::HasFile`] — case-insensitive exact **file** basename match
/// (ASCII fold, e.g. `NuGet.Config` matches `nuget.config`).
/// - [`Indicator::HasGlob`] — glob over **file** basenames only
/// (e.g. `*.tf`). Directories are never matched.
/// - [`Indicator::HasSubdirGlob`] — glob over immediate **subdirectory**
/// basenames only (e.g. `*.xcodeproj`). Files are never matched.
/// - [`Indicator::Cel`] — a CEL expression over the `files` and `subdirs`
/// lists. Requires the `cel` cargo feature; without it, registering a type
/// with this indicator fails with [`crate::Error::CelFeatureDisabled`].
/// Couples a matched project type with the indicator that fired. Surfaced by
/// [`crate::Registry::detect`] so consumers can audit detection decisions.