pub trait SourceProvider {
// Required methods
fn discover_features(&self) -> Result<Vec<String>, ProviderError>;
fn discover_packs(&self) -> Result<Vec<String>, ProviderError>;
fn read(&self, name: &str) -> Result<Arc<str>, ProviderError>;
}Expand description
Discovers and reads the feature files and macro packs of one suite.
Source names are filesystem paths rendered as strings — the identity used
by Diag.source_name and PackSource.name throughout the pipeline. read
returns raw bytes; normalization (BOM strip, trailing newline) is the
parser’s job, so spans stay consistent with the CLI.
Required Methods§
Sourcefn discover_features(&self) -> Result<Vec<String>, ProviderError>
fn discover_features(&self) -> Result<Vec<String>, ProviderError>
Every feature source name under the suite, in the order the provider finds them.
Sourcefn discover_packs(&self) -> Result<Vec<String>, ProviderError>
fn discover_packs(&self) -> Result<Vec<String>, ProviderError>
Every macro pack source name under the suite, in the order the provider finds them.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".