Skip to main content

load

Function load 

Source
pub fn load<P: ParseDiagnostic>(
    path: &Path,
) -> Result<BaselineSnapshot<P>, BaselineError>
Expand description

Load an analyzer JSON envelope from disk and return the baseline snapshot. Streams the file through a BufReader rather than reading the whole envelope into memory — large codebases produce envelopes in the multi-MB range and there’s no reason to allocate that twice.

Generic over P: ParseDiagnostic so each adapter (LCOV, Istanbul, …) supplies its own concrete diagnostic shape. The crap4rs shim crap4rs::adapters::baseline::load instantiates P = LcovParseDiagnostic so v0.4 callers’ import paths stay byte- identical.