auditable_info

Function audit_info_from_reader

Source
pub fn audit_info_from_reader<T: BufRead>(
    reader: &mut T,
    limits: Limits,
) -> Result<VersionInfo, Error>
Expand description

Loads audit info from the binary loaded from an arbitrary reader, e.g. the standard input.

let stdin = io::stdin();
let mut handle = stdin.lock();
// Uses the default limits: 1GiB input file size, 8MiB audit data size
let info = audit_info_from_reader(&mut handle, Default::default())?;

The data is validated to only have a single root package and not contain any circular dependencies.