Skip to main content

HealthGroupResolver

Trait HealthGroupResolver 

Source
pub trait HealthGroupResolver {
    // Required methods
    fn mode_label(&self) -> &'static str;
    fn resolve_with_rule(&self, rel_path: &Path) -> (String, Option<String>);
    fn section_owners_of(&self, rel_path: &Path) -> Option<&[String]>;
}
Expand description

Command-neutral grouping resolver contract for --group-by health output.

The CLI owns the concrete resolver (CODEOWNERS parsing, package discovery); the engine grouping pass only needs these three read operations, so it stays generic over the resolver instead of depending on the CLI type.

Required Methods§

Source

fn mode_label(&self) -> &'static str

Stable label for the active grouping mode (owner / directory / …).

Source

fn resolve_with_rule(&self, rel_path: &Path) -> (String, Option<String>)

Resolve a repo-relative path to its group key and the matching rule.

Source

fn section_owners_of(&self, rel_path: &Path) -> Option<&[String]>

Section owners for the group a path belongs to, when known.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§