fn db_name_from_rules_path(path: &Path) -> Result<DatabaseName<'static>> {
    let path_parsed: DirsAndFileName = path.clone().into();
    let db_name = path_parsed
        .directories
        .last()
        .map(|part| part.encoded().to_string())
        .unwrap_or_else(String::new);
    DatabaseName::new(db_name).context(DatabaseNameError)
}
/// Helper to extract the DB name from the rules file path.
Helper to extract the DB name from the rules file path.
Helper to extract the DB name from the rules file path .
fn db_name_from_rules_path(path: &Path) -> Result<DatabaseName<'static>> {
    let path_parsed: DirsAndFileName = path.clone().into();
    let db_name = path_parsed
        .directories
        .last()
        .map(|part| part.encoded().to_string())
        .unwrap_or_else(String::new);
    DatabaseName::new(db_name).context(DatabaseNameError)
}
fn db_name_from_rules_path ( path : & Path ) -> Result < DatabaseName < ' static > > { let path_parsed : DirsAndFileName = path . clone ( ) . into ( ) ; let db_name = path_parsed . directories . last ( ) . map ( | part | part . encoded ( ) . to_string ( ) ) . unwrap_or_else ( String :: new ) ; DatabaseName :: new ( db_name ) . context ( DatabaseNameError ) }
Helper to extract the DB name from the rules file path.
Helper to extract the DB name from the rules file path .
path
&Path
path
&Path