Skip to main content

ALL_CATEGORIES

Constant ALL_CATEGORIES 

Source
pub const ALL_CATEGORIES: &[&str];
Expand description

All built-in category names in stable alphabetical order.

Note: logging is a catalog-only category for snapshot_version "1.0". It is present here so embedders can emit PatternInstanceInput { category: "logging", … } and have those instances round-trip through compute_pattern_metrics and compute_delta. category_for_node_kind never returns Some("logging") — the relevant node kinds overlap with data_access and resource_management.

§Examples

use sdivi_patterns::queries::ALL_CATEGORIES;

assert!(ALL_CATEGORIES.contains(&"error_handling"));
assert!(ALL_CATEGORIES.contains(&"async_patterns"));
assert!(ALL_CATEGORIES.contains(&"data_access"));
assert!(ALL_CATEGORIES.contains(&"logging"));
assert_eq!(ALL_CATEGORIES.len(), 8);