pub struct GitPathspec(/* private fields */);Expand description
A lightweight pathspec wrapper.
Implementations§
Source§impl GitPathspec
impl GitPathspec
Sourcepub fn new(value: impl AsRef<str>) -> Result<GitPathspec, PathspecParseError>
pub fn new(value: impl AsRef<str>) -> Result<GitPathspec, PathspecParseError>
Sourcepub fn magic(&self) -> Vec<PathspecMagic>
pub fn magic(&self) -> Vec<PathspecMagic>
Returns the magic labels declared in :(...) syntax.
Sourcepub fn has_magic(&self, magic: PathspecMagic) -> bool
pub fn has_magic(&self, magic: PathspecMagic) -> bool
Returns true when a magic label is present.
Trait Implementations§
Source§impl AsRef<str> for GitPathspec
impl AsRef<str> for GitPathspec
Source§impl Clone for GitPathspec
impl Clone for GitPathspec
Source§fn clone(&self) -> GitPathspec
fn clone(&self) -> GitPathspec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GitPathspec
impl Debug for GitPathspec
Source§impl Display for GitPathspec
impl Display for GitPathspec
Source§impl FromStr for GitPathspec
impl FromStr for GitPathspec
Source§type Err = PathspecParseError
type Err = PathspecParseError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<GitPathspec, <GitPathspec as FromStr>::Err>
fn from_str(value: &str) -> Result<GitPathspec, <GitPathspec as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for GitPathspec
impl Hash for GitPathspec
Source§impl Ord for GitPathspec
impl Ord for GitPathspec
Source§fn cmp(&self, other: &GitPathspec) -> Ordering
fn cmp(&self, other: &GitPathspec) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GitPathspec
impl PartialEq for GitPathspec
Source§fn eq(&self, other: &GitPathspec) -> bool
fn eq(&self, other: &GitPathspec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GitPathspec
impl PartialOrd for GitPathspec
impl Eq for GitPathspec
impl StructuralPartialEq for GitPathspec
Auto Trait Implementations§
impl Freeze for GitPathspec
impl RefUnwindSafe for GitPathspec
impl Send for GitPathspec
impl Sync for GitPathspec
impl Unpin for GitPathspec
impl UnsafeUnpin for GitPathspec
impl UnwindSafe for GitPathspec
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