Skip to main content

compile_glob_set

Function compile_glob_set 

Source
pub fn compile_glob_set<I, S>(patterns: I) -> GlobSet
where I: IntoIterator<Item = S>, S: AsRef<str>,
Expand description

Compile patterns into a single [GlobSet] that matches a path against any of them in one pass.

Recoverable failures degrade rather than panic:

  • an individual unparsable pattern is logged at warn and skipped (the surviving patterns still compile);
  • if the final GlobSet build fails, an empty set is returned (matches nothing) and the failure is logged at warn.

An empty patterns iterator yields an empty set, which matches nothing – callers that want “unconstrained” must not build a glob at all (see crate::EventFilter::path_glob, where None is the unconstrained case).