Enum xmlparser::StreamError
source · pub enum StreamError {
UnexpectedEndOfStream,
InvalidName,
InvalidAttributeValue,
InvalidChar(Vec<u8>, TextPos),
InvalidQuote(char, TextPos),
InvalidSpace(char, TextPos),
InvalidString(Vec<String>, TextPos),
InvalidReference,
InvalidExternalID,
}
Expand description
A stream parser errors.
Variants§
UnexpectedEndOfStream
The steam ended earlier than we expected.
Should only appear on invalid input data. Errors in a valid XML should be handled by errors below.
InvalidName
An unknown token.
InvalidAttributeValue
An attribute value must not contain the <
character.
InvalidChar(Vec<u8>, TextPos)
An invalid/unexpected character.
The first byte is an actual one, others - expected.
We are using a single value to reduce the struct size.
InvalidQuote(char, TextPos)
An unexpected character instead of "
or '
.
InvalidSpace(char, TextPos)
An unexpected character instead of an XML space.
Includes: ' ' \n \r \t   	 
 

.
InvalidString(Vec<String>, TextPos)
An unexpected character instead of an XML space.
The first string is an actual one, others - expected.
We are using a single value to reduce the struct size.
InvalidReference
An invalid reference.
InvalidExternalID
An invalid ExternalID in the DTD.
Trait Implementations§
source§impl Debug for StreamError
impl Debug for StreamError
source§impl Display for StreamError
impl Display for StreamError
source§impl Error for StreamError
impl Error for StreamError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more