Enum titanic::err::ParseError[]

pub enum ParseError {
    Lexer(LexError),
    UnexpectedToken,
    UnexpectedSentenceType,
    Time(ParseError),
    UnexpectedDir(ArrayVec<[u8; 64]>),
    Utf8(Utf8Error),
    InvalidValue(&'static str),
    Int(ParseIntError),
    Float(ParseFloatError),
    InvalidCoord(f64f64),
    InvalidUnit,
}

Errors that can happen while parsing.

Variants

Encountered an error while lexing.

Found an unexpected token.

Found an unexptected sentence type.

Failed to parse a FloatLiteral to a NaiveTime.

Failed to parse a StringLiteral to a CardDir.

Failed to convert to str. This should not happen if the lexer only returns ascii bytes.

Found an invalid value. E.g. a station id not between 0 and 1023, a float with the wrong format for a coordinate, ...

Failed to parse an integer.

Failed to parse a float.

Found an invalid coordinate, e.g. latitude outside of the range -90° to +90°.

Found an unexpected unit.

Trait Implementations

impl Debug for ParseError
[src]

Formats the value using the given formatter. Read more

impl Display for ParseError

Formats the value using the given formatter. Read more

impl Error for ParseError

This method is soft-deprecated. Read more

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

impl From<LexError> for ParseError

Performs the conversion.

impl From<ParseError> for ParseError

Performs the conversion.

impl From<Utf8Error> for ParseError

Performs the conversion.

impl From<ParseIntError> for ParseError

Performs the conversion.

impl From<ParseFloatError> for ParseError

Performs the conversion.

Auto Trait Implementations

impl Send for ParseError

impl Sync for ParseError