Trait Glob

Source
pub trait Glob {
    // Required method
    fn glob_with(
        &self,
        pattern: &str,
        options: &MatchOptions,
    ) -> Result<Paths, PatternError>;

    // Provided methods
    fn glob(&self, pattern: &str) -> Result<Paths, PatternError> { ... }
    fn rglob_with(
        &self,
        pattern: &str,
        options: &MatchOptions,
    ) -> Result<Paths, PatternError> { ... }
    fn rglob(&self, pattern: &str) -> Result<Paths, PatternError> { ... }
}
Expand description

A trait providing glob methods.

The idea is “glob starting from here”

Required Methods§

Source

fn glob_with( &self, pattern: &str, options: &MatchOptions, ) -> Result<Paths, PatternError>

Glob here with explicit options

Provided Methods§

Source

fn glob(&self, pattern: &str) -> Result<Paths, PatternError>

Glob here with default options

Source

fn rglob_with( &self, pattern: &str, options: &MatchOptions, ) -> Result<Paths, PatternError>

Glob inside of here with explicit options (<here>/**/<pattern>)

Source

fn rglob(&self, pattern: &str) -> Result<Paths, PatternError>

Glob inside of here with default options (<here>/**/<pattern>)

Implementors§

Source§

impl<P: AsRef<Path>> Glob for P