Skip to main content

Crate use_glob

Crate use_glob 

Source
Expand description

§use-glob

Practical glob pattern helpers for RustUse.

Warning: versions below 0.3.0 are experimental and may change as the workspace matures.

§Example Usage

use use_glob::is_glob_pattern;

assert!(is_glob_pattern("src/**/*.rs"));

§Scope

  • string-based glob detection, conversion, and matching helpers
  • normalized separator handling for predictable behavior
  • lightweight utilities for tooling and fixtures

§Non-Goals

  • filesystem walking
  • gitignore engines
  • shell expansion
  • full platform-specific path semantics

§License

Licensed under either of the following, at your option:

  • MIT License
  • Apache License, Version 2.0

Structs§

GlobPattern

Enums§

GlobToken

Functions§

escape_glob
Escapes glob metacharacters so they are treated literally.
glob_matches
Returns true when the glob pattern matches the full input string.
glob_to_regex
Converts a glob pattern into an anchored regex string.
has_glob_wildcards
Returns true when a pattern contains any wildcard or character-class token.
has_recursive_glob
Returns true when a pattern contains ** semantics.
is_glob_pattern
Returns true when the input contains any unescaped glob syntax.
normalize_glob_separators
Normalizes Windows separators to forward slashes.
split_glob_segments
Splits a normalized glob pattern on / boundaries.