pub struct GitIgnorePattern(/* private fields */);Expand description
A non-empty ignore pattern.
Implementations§
Source§impl GitIgnorePattern
impl GitIgnorePattern
Sourcepub fn new(
value: impl AsRef<str>,
) -> Result<GitIgnorePattern, GitIgnoreParseError>
pub fn new( value: impl AsRef<str>, ) -> Result<GitIgnorePattern, GitIgnoreParseError>
Creates an ignore pattern from text.
§Errors
Returns GitIgnoreParseError::EmptyPattern when the pattern is empty.
Trait Implementations§
Source§impl AsRef<str> for GitIgnorePattern
impl AsRef<str> for GitIgnorePattern
Source§impl Clone for GitIgnorePattern
impl Clone for GitIgnorePattern
Source§fn clone(&self) -> GitIgnorePattern
fn clone(&self) -> GitIgnorePattern
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 GitIgnorePattern
impl Debug for GitIgnorePattern
Source§impl Display for GitIgnorePattern
impl Display for GitIgnorePattern
Source§impl Hash for GitIgnorePattern
impl Hash for GitIgnorePattern
Source§impl Ord for GitIgnorePattern
impl Ord for GitIgnorePattern
Source§fn cmp(&self, other: &GitIgnorePattern) -> Ordering
fn cmp(&self, other: &GitIgnorePattern) -> 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 GitIgnorePattern
impl PartialEq for GitIgnorePattern
Source§fn eq(&self, other: &GitIgnorePattern) -> bool
fn eq(&self, other: &GitIgnorePattern) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GitIgnorePattern
impl PartialOrd for GitIgnorePattern
impl Eq for GitIgnorePattern
impl StructuralPartialEq for GitIgnorePattern
Auto Trait Implementations§
impl Freeze for GitIgnorePattern
impl RefUnwindSafe for GitIgnorePattern
impl Send for GitIgnorePattern
impl Sync for GitIgnorePattern
impl Unpin for GitIgnorePattern
impl UnsafeUnpin for GitIgnorePattern
impl UnwindSafe for GitIgnorePattern
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