pub enum SyntaxError {
ExpectedMovetoCommand {
character: char,
index: usize,
},
InvalidNumber {
number: String,
start: usize,
end: usize,
},
InvalidCharacter {
character: char,
index: usize,
expected: &'static str,
},
UnexpectedEnding {
index: usize,
expected: &'static str,
},
InvalidArcFlag {
command: char,
character: char,
index: usize,
},
InvalidArcRadius {
command: char,
start: usize,
end: usize,
value: f64,
},
}
Expand description
Syntax errors that can occur when parsing an SVG path
These errors try to be exhaustive.
Variants§
ExpectedMovetoCommand
The first command in a path is not moveto.
InvalidNumber
Invalid number found in path.
Fields
InvalidCharacter
Invalid character found in path.
Fields
UnexpectedEnding
Invalid path ending.
InvalidArcFlag
Invalid SVG quaractic arc command flag argument.
Fields
InvalidArcRadius
Invalid SVG quaractic arc command radius argument.
Trait Implementations§
Source§impl Clone for SyntaxError
impl Clone for SyntaxError
Source§fn clone(&self) -> SyntaxError
fn clone(&self) -> SyntaxError
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SyntaxError
impl Debug for SyntaxError
Source§impl Display for SyntaxError
impl Display for SyntaxError
Source§impl Error for SyntaxError
impl Error for SyntaxError
Source§impl ErrorCompat for SyntaxError
impl ErrorCompat for SyntaxError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source
. Read moreSource§impl PartialEq for SyntaxError
impl PartialEq for SyntaxError
impl StructuralPartialEq for SyntaxError
Auto Trait Implementations§
impl Freeze for SyntaxError
impl RefUnwindSafe for SyntaxError
impl Send for SyntaxError
impl Sync for SyntaxError
impl Unpin for SyntaxError
impl UnwindSafe for SyntaxError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more