Enum svgparser::Error [] [src]

pub enum Error {
    EndOfStream,
    UnexpectedEndOfStream(ErrorPos),
    InvalidChar {
        current: char,
        expected: char,
        pos: ErrorPos,
    },
    InvalidSvgToken(ErrorPos),
    UnexpectedClosingTag(ErrorPos),
    InvalidNumber(ErrorPos),
    InvalidLength(ErrorPos),
    InvalidColor(ErrorPos),
    InvalidTransform(ErrorPos),
    InvalidAttributeValue(ErrorPos),
    InvalidAdvance {
        expected: isize,
        total: usize,
        pos: ErrorPos,
    },
    ElementWithoutTagName(ErrorPos),
}

List of all supported errors.

Variants

Technically, EndOfStream is not an error, it's just indicates reaching the end of the stream.

The steam ended earlier than we expected.

Should only appear on invalid input data. Errors in the valid SVG should be handled by errors below.

Can appear during consuming expected char.

Fields

Current char in the stream.

Expected char.

Absolute stream position.

Invalid SVG token.

The stream found closing tag without an opening tag.

Error during a number parsing.

Error during a length parsing.

Error during a color parsing.

Error during a transform parsing.

Invalid attribute value.

Can appear during moving along the data stream.

Fields

The advance step.

Full length of the steam.

Absolute stream position.

An SVG element must contain a tag name.

Trait Implementations

impl Clone for Error
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Error
[src]

impl PartialEq for Error
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Error
[src]

Formats the value using the given formatter.