Enum svg_path_cst::SyntaxError
source · pub enum SyntaxError {
ExpectedMovetoCommand {
command: char,
index: usize,
},
InvalidNumber {
number: String,
index: usize,
},
InvalidCharacter {
character: char,
index: usize,
expected: String,
},
UnexpectedEnding {
index: usize,
expected: String,
},
InvalidArcFlag {
character: char,
index: usize,
},
InvalidArcRadius {
command: char,
index: 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.
InvalidCharacter
Fields
Invalid character found in path.
UnexpectedEnding
Invalid path ending.
InvalidArcFlag
Invalid SVG quaractic arc command flag argument.
InvalidArcRadius
Fields
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 copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
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 SyntaxErrorwhere
Self: Debug + Display,
impl Error for SyntaxErrorwhere Self: Debug + Display,
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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
source§fn eq(&self, other: &SyntaxError) -> bool
fn eq(&self, other: &SyntaxError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for SyntaxError
Auto Trait Implementations§
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