pub struct Pathspec { /* private fields */ }Expand description
A full pathspec: an ordered list of PathspecElements combining positive
(include) and :(exclude) patterns.
Semantics (git match_pathspec): a path matches when at least one
non-exclude element selects it AND no exclude element selects it. An
all-exclude (or empty) pathspec matches everything not excluded — matching
git, where git log -- ':(exclude)foo' keeps every path but foo.
Implementations§
Source§impl Pathspec
impl Pathspec
Sourcepub fn parse<I, S>(
args: I,
defaults: PathspecMatchMagic,
) -> Result<Self, PathspecParseError>
pub fn parse<I, S>( args: I, defaults: PathspecMatchMagic, ) -> Result<Self, PathspecParseError>
Parse a list of raw pathspec arguments under the given global magic
defaults (from --{glob,noglob,literal,icase}-pathspecs).
Sourcepub fn elements(&self) -> &[PathspecElement]
pub fn elements(&self) -> &[PathspecElement]
The parsed elements, in order.
Trait Implementations§
impl Eq for Pathspec
impl StructuralPartialEq for Pathspec
Auto Trait Implementations§
impl Freeze for Pathspec
impl RefUnwindSafe for Pathspec
impl Send for Pathspec
impl Sync for Pathspec
impl Unpin for Pathspec
impl UnsafeUnpin for Pathspec
impl UnwindSafe for Pathspec
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
Mutably borrows from an owned value. Read more