pub struct IgnoreFile { /* private fields */ }Expand description
A parsed ignore file: patterns in file order, last-match-wins.
Implementations§
Source§impl IgnoreFile
impl IgnoreFile
Sourcepub fn load(path: &Path) -> Result<IgnoreFile, String>
pub fn load(path: &Path) -> Result<IgnoreFile, String>
Parse and compile the file at path. Err names the 1-based line
number for invalid patterns (empty effective pattern, lone / or !).
Sourcepub fn parse(text: &str) -> Result<IgnoreFile, String>
pub fn parse(text: &str) -> Result<IgnoreFile, String>
Parse ignore rules from raw text (exposed for tests).
Trait Implementations§
Source§impl Clone for IgnoreFile
impl Clone for IgnoreFile
Source§impl Debug for IgnoreFile
impl Debug for IgnoreFile
Auto Trait Implementations§
impl Freeze for IgnoreFile
impl RefUnwindSafe for IgnoreFile
impl Send for IgnoreFile
impl Sync for IgnoreFile
impl Unpin for IgnoreFile
impl UnsafeUnpin for IgnoreFile
impl UnwindSafe for IgnoreFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more