Struct git_repository::path::Spec
source · [−]pub struct Spec(_);
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
sourceimpl Spec
impl Spec
sourcepub fn from_bytes(input: &BStr) -> Option<Spec>
pub fn from_bytes(input: &BStr) -> Option<Spec>
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) -> &Spec
pub fn apply_prefix(&mut self, prefix: &Path) -> &Spec
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 RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more