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
sourceimpl Debug for StreamError
impl Debug for StreamError
sourceimpl Display for StreamError
impl Display for StreamError
sourceimpl Error for StreamError
impl Error for StreamError
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
Auto Trait Implementations
impl RefUnwindSafe for StreamError
impl Send for StreamError
impl Sync for StreamError
impl Unpin for StreamError
impl UnwindSafe for StreamError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more