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§
source§impl 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.