Enum svgparser::Error
[−]
[src]
pub enum Error {
EndOfStream,
UnexpectedEndOfStream(ErrorPos),
InvalidChar {
current: char,
expected: char,
pos: ErrorPos,
},
InvalidSvgToken(ErrorPos),
InvalidNumber(ErrorPos),
InvalidColor(ErrorPos),
InvalidTransform(ErrorPos),
InvalidAttributeValue(ErrorPos),
AdvanceError {
expected: isize,
total: usize,
pos: ErrorPos,
},
ElementWithoutTagName(ErrorPos),
}List of all supported errors.
Variants
EndOfStreamTechnically, EndOfStream is not an error.
It's just indicates reaching the end of the stream.
UnexpectedEndOfStream(ErrorPos)The steam ended earlier than we expected.
Should only appear on invalid input data. Errors in valid SVG should be handled by errors below.
InvalidCharCan appear during consuming expected char.
Fields
current: char | Current char in stream. |
expected: char | Expected char. |
pos: ErrorPos | Absolute stream position. |
InvalidSvgToken(ErrorPos)Invalid SVG/XML token.
InvalidNumber(ErrorPos)Error during a number parsing.
InvalidColor(ErrorPos)Error during a color parsing.
InvalidTransform(ErrorPos)Error during a transform parsing.
InvalidAttributeValue(ErrorPos)Invalid attribute value.
AdvanceErrorCan appear during moving along the data stream.
Fields
expected: isize | Advance step. |
total: usize | Full length of the steam. |
pos: ErrorPos | Absolute stream position. |
ElementWithoutTagName(ErrorPos)SVG Element must contain tag name.
Trait Implementations
impl PartialEq for Error[src]
fn eq(&self, __arg_0: &Error) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Error) -> bool
This method tests for !=.
impl Copy for Error[src]
impl Clone for Error[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more