Skip to main content

detect_package

Function detect_package 

Source
pub fn detect_package<'a>(
    packages: &'a [Box<dyn FormatPackage>],
    path: &str,
    bytes: &[u8],
) -> Option<&'a dyn FormatPackage>
Expand description

The package that claims the document most confidently; equal claims break by package id, so selection is deterministic whatever order the registry was built in.