Enum format_serde_error::ErrorTypes[][src]

pub enum ErrorTypes {
    Json(Error),
    Yaml(Error),
    Custom {
        error: Box<dyn Error>,
        line: Option<usize>,
        column: Option<usize>,
    },
}
Expand description

Contains the error that will be used by SerdeError to format the output. For this to work the error needs to support emitting the line and column of the error. We are implementing Into for some common types. If a error type is not implemented yet the ErrorTypes::Custom can be used instead.

Variants

Json(Error)
Yaml(Error)
Custom

Used for custom errors that don’t come from serde_yaml or serde_json.

Show fields

Fields of Custom

error: Box<dyn Error>

Error message that should be displayed.

line: Option<usize>

Line the error occurred at.

column: Option<usize>

Column the error occurred at.

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.