Enum ignore::Error
[−]
[src]
pub enum Error { Partial(Vec<Error>), WithLineNumber { line: u64, err: Box<Error>, }, WithPath { path: PathBuf, err: Box<Error>, }, Io(Error), Glob(String), UnrecognizedFileType(String), InvalidDefinition, }
Represents an error that can occur when parsing a gitignore file.
Variants
Partial(Vec<Error>)
A collection of "soft" errors. These occur when adding an ignore file partially succeeded.
WithLineNumber
An error associated with a specific line number.
Fields
line: u64 | |
err: Box<Error> |
WithPath
An error associated with a particular file path.
Fields
path: PathBuf | |
err: Box<Error> |
Io(Error)
An error that occurs when doing I/O, such as reading an ignore file.
Glob(String)
An error that occurs when trying to parse a glob.
UnrecognizedFileType(String)
A type selection for a file type that is not defined.
InvalidDefinition
A user specified file type definition could not be parsed.
Methods
impl Error
[src]
fn is_partial(&self) -> bool
Returns true if this is a partial error.
A partial error occurs when only some operations failed while others may have succeeded. For example, an ignore file may contain an invalid glob among otherwise valid globs.
fn is_io(&self) -> bool
Returns true if this error is exclusively an I/O error.
Trait Implementations
impl Debug for Error
[src]
impl Error for Error
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0
The lower-level cause of this error, if any. Read more