Skip to main content

glob

Macro glob 

Source
macro_rules! glob {
    ($pattern:expr) => { ... };
}
Expand description

Creates a globset::Glob from a string literal, panicking if the pattern is invalid.

Intended for use with constant patterns where an invalid glob is a bug.

ยงExamples

use loadsmith_loader::glob;

let g = glob!("version.dll");
let matcher = g.compile_matcher();
assert!(matcher.is_match("version.dll"));
assert!(!matcher.is_match("winmm.dll"));