Skip to main content

SimpleDomain

Trait SimpleDomain 

Source
pub trait SimpleDomain:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn matches(&self, repo_path: &Path) -> bool;

    // Provided method
    fn base_capabilities(&self) -> CapabilitySet { ... }
}
Expand description

Extension trait for domains with simple boolean detection

Implement this trait for domains where detection is a simple boolean check. The blanket implementation will automatically implement Domain for you, converting matches() to DetectionResult.

Required Methods§

Source

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

Domain identifier for Casbin (e.g., “HfModel”)

Source

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

Human-readable description

Source

fn matches(&self, repo_path: &Path) -> bool

Check if repository matches this domain (simple boolean check)

Provided Methods§

Source

fn base_capabilities(&self) -> CapabilitySet

Base capabilities this domain provides when detected

Implementors§