Enum jomini::ErrorKind

source ·
pub enum ErrorKind {
    Eof,
    StackEmpty {
        offset: usize,
    },
    InvalidEmptyObject {
        offset: usize,
    },
    InvalidSyntax {
        msg: String,
        offset: usize,
    },
    Deserialize(DeserializeError),
    Io(Error),
}
Expand description

Specific type of error

Variants§

§

Eof

Unexpected end of input

§

StackEmpty

Fields

§offset: usize

The byte offset where the stack became empty

Too many close delimiters were encountered

§

InvalidEmptyObject

Fields

§offset: usize

The byte offset where the invalid empty object was encountered

Expected a close delimiter after encountering an empty opener

§

InvalidSyntax

Fields

§msg: String

An error message describing the invalid syntax

§offset: usize

The byte offset where the invalid syntax was encountered

Invalid syntax encountered

§

Deserialize(DeserializeError)

An error occurred when deserializing the data

§

Io(Error)

An error occurred when performing IO.

Implementations§

The byte offset where the invalid syntax was encountered

Examples found in repository?
src/errors.rs (line 26)
25
26
27
    pub fn offset(&self) -> Option<usize> {
        self.0.offset()
    }

Trait Implementations§

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.