[][src]Enum xmlparser::StreamError

pub enum StreamError {
    UnexpectedEndOfStream,
    InvalidName,
    NonXmlChar(charTextPos),
    InvalidChar(u8u8TextPos),
    InvalidCharMultiple(u8&'static [u8]TextPos),
    InvalidQuote(u8TextPos),
    InvalidSpace(u8TextPos),
    InvalidString(&'static strTextPos),
    InvalidReference,
    InvalidExternalID,
    InvalidCommentData,
    InvalidCommentEnd,
    InvalidCharacterData,
}

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 invalid name.

NonXmlChar(charTextPos)

A non-XML character has occurred.

Valid characters are: https://www.w3.org/TR/xml/#char32

InvalidChar(u8u8TextPos)

An invalid/unexpected character.

The first byte is an actual one, the second one is expected.

We are using a single value to reduce the struct size.

InvalidCharMultiple(u8&'static [u8]TextPos)

An invalid/unexpected character.

Just like InvalidChar, but specifies multiple expected characters.

InvalidQuote(u8TextPos)

An unexpected character instead of " or '.

InvalidSpace(u8TextPos)

An unexpected character instead of an XML space.

Includes: ' ' \n \r \t   	 
 
.

InvalidString(&'static strTextPos)

An unexpected string.

Contains what string was expected.

InvalidReference

An invalid reference.

InvalidExternalID

An invalid ExternalID in the DTD.

InvalidCommentData

Comment cannot contain --.

InvalidCommentEnd

Comment cannot end with -.

InvalidCharacterData

A Character Data node contains an invalid data.

Currently, only ]]> is not allowed.

Trait Implementations

impl Clone for StreamError[src]

impl Copy for StreamError[src]

impl Debug for StreamError[src]

impl Display for StreamError[src]

impl Eq for StreamError[src]

impl Error for StreamError[src]

impl Hash for StreamError[src]

impl PartialEq<StreamError> for StreamError[src]

impl StructuralEq for StreamError[src]

impl StructuralPartialEq for StreamError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.