id_from_path

Function id_from_path 

Source
fn id_from_path(root: &Path, webc: &Path) -> Option<NamedPackageId>
Expand description

The package id encoded by a webc’s location under root (<namespace>/<name>/<version>.webc or <name>/<version>.webc), if it fits the layout. Used where a walk finds a file and its id must be derived backwards; named lookups go the other way via package_dir_path.