Skip to main content

AttributeSource

Trait AttributeSource 

Source
pub trait AttributeSource {
    // Required method
    fn check_attr(
        &self,
        attr: &str,
        paths: &[&[u8]],
    ) -> Result<Vec<AttrValue>, EngineError>;
}
Expand description

gitattributes lookup, for the generated-file hint — never enumeration.

Takes an attribute name the caller chose; it does not take a Config and iterate one itself, because a port that reads config is a port that could filter (ADR 0012).

Required Methods§

Source

fn check_attr( &self, attr: &str, paths: &[&[u8]], ) -> Result<Vec<AttrValue>, EngineError>

Note, unchanged from before this trait existed: check-attr consults the worktree/index .gitattributes, not the reviewed revisions — acceptable for a hint that can never remove a file from enumeration.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§