pub enum AttrError {
ExpectedEq(usize),
ExpectedValue(usize),
UnquotedValue(usize),
ExpectedQuote(usize, u8),
Duplicated(usize, usize),
}Expand description
Errors that can be raised while parsing attributes.
The recovery positions in the examples show where parsing of the next attribute will be attempted.
Variants§
ExpectedEq(usize)
The attribute key was not followed by =. Contains the position relative
to the start of the owning tag. Only raised in XML mode.
ExpectedValue(usize)
No attribute value was found after =. Contains the position relative to
the start of the owning tag.
UnquotedValue(usize)
An attribute value was not quoted. Contains the position relative to the start of the owning tag. Only raised in XML mode.
ExpectedQuote(usize, u8)
An attribute value was not terminated with a matching quote. Contains the position and the expected quote byte.
Duplicated(usize, usize)
An attribute with the same name was already encountered. Contains the position of the new attribute and the position of the previous one.
Trait Implementations§
impl Eq for AttrError
Source§impl Error for AttrError
impl Error for AttrError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()