pub fn validate_name_as_os_str( s: &(impl AsRef<OsStr> + ?Sized), ) -> Result<&str, Error>
Checks a given OsStr to match the restrictions for StorePath::name, and returns the name as &str if successful.