Struct gix::PathspecDetached
source · pub struct PathspecDetached {
pub stack: Option<Stack>,
pub search: Search,
pub odb: HandleArc,
}
Available on crate feature
attributes
only.Expand description
Like Pathspec
, but without a Repository reference and with minimal API.
Fields§
§stack: Option<Stack>
The cache to power attribute access. It’s only initialized if we have a pattern with attributes.
search: Search
The prepared search to use for checking matches.
odb: HandleArc
A thread-safe version of an ODB.
Implementations§
source§impl PathspecDetached
impl PathspecDetached
Access
sourcepub fn pattern_matching_relative_path<'a>(
&mut self,
relative_path: impl Into<&'a BStr>,
is_dir: Option<bool>
) -> Option<Match<'_>>
pub fn pattern_matching_relative_path<'a>( &mut self, relative_path: impl Into<&'a BStr>, is_dir: Option<bool> ) -> Option<Match<'_>>
Return the first Match
of relative_path
, or None
.
Note that the match might be excluded.
is_dir
is true if relative_path
is a directory.
sourcepub fn is_included<'a>(
&mut self,
relative_path: impl Into<&'a BStr>,
is_dir: Option<bool>
) -> bool
pub fn is_included<'a>( &mut self, relative_path: impl Into<&'a BStr>, is_dir: Option<bool> ) -> bool
The simplified version of pattern_matching_relative_path()
which returns
true
if relative_path
is included in the set of positive pathspecs, while not being excluded.
Trait Implementations§
source§impl Clone for PathspecDetached
impl Clone for PathspecDetached
source§fn clone(&self) -> PathspecDetached
fn clone(&self) -> PathspecDetached
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Pathspec for PathspecDetached
Available on crate feature status
only.
impl Pathspec for PathspecDetached
Available on crate feature
status
only.source§fn common_prefix(&self) -> &BStr
fn common_prefix(&self) -> &BStr
Return the portion of the prefix among all of the pathspecs involved in this search, or an empty string if
there is none. It doesn’t have to end at a directory boundary though, nor does it denote a directory. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PathspecDetached
impl Send for PathspecDetached
impl !Sync for PathspecDetached
impl Unpin for PathspecDetached
impl !UnwindSafe for PathspecDetached
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