Enum ignore::Error [] [src]

pub enum Error {
    Partial(Vec<Error>),
    WithLineNumber {
        line: u64,
        err: Box<Error>,
    },
    WithPath {
        path: PathBuf,
        err: Box<Error>,
    },
    WithDepth {
        depth: usize,
        err: Box<Error>,
    },
    Loop {
        ancestor: PathBuf,
        child: PathBuf,
    },
    Io(Error),
    Glob(String),
    UnrecognizedFileType(String),
    InvalidDefinition,
}

Represents an error that can occur when parsing a gitignore file.

Variants

A collection of "soft" errors. These occur when adding an ignore file partially succeeded.

An error associated with a specific line number.

Fields of WithLineNumber

The line number.

The underlying error.

An error associated with a particular file path.

Fields of WithPath

The file path.

The underlying error.

An error associated with a particular directory depth when recursively walking a directory.

Fields of WithDepth

The directory depth.

The underlying error.

An error that occurs when a file loop is detected when traversing symbolic links.

Fields of Loop

The ancestor file path in the loop.

The child file path in the loop.

An error that occurs when doing I/O, such as reading an ignore file.

An error that occurs when trying to parse a glob.

A type selection for a file type that is not defined.

A user specified file type definition could not be parsed.

Methods

impl Error
[src]

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.

Returns true if this error is exclusively an I/O error.

Returns a depth associated with recursively walking a directory (if this error was generated from a recursive directory iterator).

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter.

impl Error for Error
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more

impl Display for Error
[src]

Formats the value using the given formatter.

impl From<Error> for Error
[src]

Performs the conversion.

impl From<Error> for Error
[src]

Performs the conversion.