pub struct Spec(/* private fields */);
Expand description
A dummy type to represent path specs and help finding all spots that take path specs once it is implemented. A preliminary version of a path-spec based on glances of the code.
Implementations§
Source§impl Spec
impl Spec
Sourcepub fn from_bytes(input: &BStr) -> Option<Self>
pub fn from_bytes(input: &BStr) -> Option<Self>
Parse input
into a Spec
or None
if it could not be parsed
Sourcepub fn items(&self) -> impl Iterator<Item = &BStr>
pub fn items(&self) -> impl Iterator<Item = &BStr>
Return all paths described by this path spec, using slashes on all platforms.
Sourcepub fn apply_prefix(&mut self, prefix: &Path) -> &Self
pub fn apply_prefix(&mut self, prefix: &Path) -> &Self
Adjust this path specification according to the given prefix
, which may be empty to indicate we are the at work-tree root.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
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