pub enum FilePattern {
FilePath(RepoPathBuf),
PrefixPath(RepoPathBuf),
FileGlob {
dir: RepoPathBuf,
pattern: Box<Glob>,
},
PrefixGlob {
dir: RepoPathBuf,
pattern: Box<Glob>,
},
}Expand description
Basic pattern to match RepoPath.
Variants§
FilePath(RepoPathBuf)
Matches file (or exact) path.
PrefixPath(RepoPathBuf)
Matches path prefix.
FileGlob
Matches file (or exact) path with glob pattern.
Fields
dir: RepoPathBufPrefix directory path where the pattern will be evaluated.
PrefixGlob
Matches path prefix with glob pattern.
Fields
dir: RepoPathBufPrefix directory path where the pattern will be evaluated.
Implementations§
Source§impl FilePattern
impl FilePattern
Sourcepub fn from_str_kind(
path_converter: &RepoPathUiConverter,
input: &str,
kind: &str,
) -> Result<Self, FilePatternParseError>
pub fn from_str_kind( path_converter: &RepoPathUiConverter, input: &str, kind: &str, ) -> Result<Self, FilePatternParseError>
Parses the given input string as pattern of the specified kind.
Sourcepub fn cwd_file_path(
path_converter: &RepoPathUiConverter,
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn cwd_file_path( path_converter: &RepoPathUiConverter, input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches cwd-relative file (or exact) path.
Sourcepub fn cwd_prefix_path(
path_converter: &RepoPathUiConverter,
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn cwd_prefix_path( path_converter: &RepoPathUiConverter, input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches cwd-relative path prefix.
Sourcepub fn cwd_file_glob(
path_converter: &RepoPathUiConverter,
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn cwd_file_glob( path_converter: &RepoPathUiConverter, input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches cwd-relative file path glob.
Sourcepub fn cwd_file_glob_i(
path_converter: &RepoPathUiConverter,
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn cwd_file_glob_i( path_converter: &RepoPathUiConverter, input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches cwd-relative file path glob (case-insensitive).
Sourcepub fn cwd_prefix_glob(
path_converter: &RepoPathUiConverter,
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn cwd_prefix_glob( path_converter: &RepoPathUiConverter, input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches cwd-relative path prefix by glob.
Sourcepub fn cwd_prefix_glob_i(
path_converter: &RepoPathUiConverter,
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn cwd_prefix_glob_i( path_converter: &RepoPathUiConverter, input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches cwd-relative path prefix by glob (case-insensitive).
Sourcepub fn root_file_path(
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn root_file_path( input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches workspace-relative file (or exact) path.
Sourcepub fn root_prefix_path(
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn root_prefix_path( input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches workspace-relative path prefix.
Sourcepub fn root_file_glob(
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn root_file_glob( input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches workspace-relative file path glob.
Sourcepub fn root_file_glob_i(
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn root_file_glob_i( input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches workspace-relative file path glob (case-insensitive).
Sourcepub fn root_prefix_glob(
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn root_prefix_glob( input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches workspace-relative path prefix by glob.
Sourcepub fn root_prefix_glob_i(
input: impl AsRef<str>,
) -> Result<Self, FilePatternParseError>
pub fn root_prefix_glob_i( input: impl AsRef<str>, ) -> Result<Self, FilePatternParseError>
Pattern that matches workspace-relative path prefix by glob (case-insensitive).
Trait Implementations§
Source§impl Clone for FilePattern
impl Clone for FilePattern
Source§fn clone(&self) -> FilePattern
fn clone(&self) -> FilePattern
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FilePattern
impl RefUnwindSafe for FilePattern
impl Send for FilePattern
impl Sync for FilePattern
impl Unpin for FilePattern
impl UnwindSafe for FilePattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more