Struct scan_rules::ScanError [] [src]

pub struct ScanError {
    pub at: ScanErrorAt,
    pub kind: ScanErrorKind,
    // some fields omitted
}

Represents an error that occurred during scanning.

Depending on what happened, it could represent an actual scanning failure, a problem with the pattern, an underlying IO failure, or something else entirely.

Fields

The rough cursor position at which this error occurred. This will typically be the position the input cursor was at when it began trying to scan a particular literal or value.

The kind of error that occurred.

Methods

impl ScanError
[src]

Construct a new ScanError.

Shorthand for constructing an ExpectedEnd error.

Shorthand for constructing an Float error.

Shorthand for constructing an Int error.

Shorthand for constructing an Io error.

Shorthand for constructing a LiteralMismatch error.

Shorthand for constructing a Syntax error.

Shorthand for constructing a SyntaxNoMessage error.

Shorthand for constructing an Other error.

Compare two ScanErrors, and return the one which occurred the furthest into the input cursor.

Adds the given number of bytes to the error's position.

This is used where an error has been generated by trying to scan a subslice of the original input, and the position needs to be corrected.

Trait Implementations

impl Debug for ScanError
[src]

Formats the value using the given formatter.

impl<'a> Display for ScanError
[src]

Formats the value using the given formatter. Read more

impl Error for ScanError
[src]

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

A short description of the error. Read more