Enum junit_report::Error

source ·
pub enum Error {
Show 13 variants Io(Arc<Error>), NonDecodable(Option<Utf8Error>), UnexpectedEof(String), EndEventMismatch { expected: String, found: String, }, UnexpectedToken(String), UnexpectedBang(u8), TextNotFound, XmlDeclWithoutVersion(Option<String>), EmptyDocType, InvalidAttr(AttrError), EscapeError(EscapeError), UnknownPrefix(Vec<u8>), InvalidPrefixBind { prefix: Vec<u8>, namespace: Vec<u8>, },
}
Expand description

The error type used by this crate.

Variants§

§

Io(Arc<Error>)

XML document cannot be read from or written to underlying source.

Contains the reference-counted I/O error to make the error type Cloneable.

§

NonDecodable(Option<Utf8Error>)

Input decoding error. If encoding feature is disabled, contains None, otherwise contains the UTF-8 decoding error

§

UnexpectedEof(String)

Unexpected End of File

§

EndEventMismatch

Fields

§expected: String

Expected end event

§found: String

Found end event

End event mismatch

§

UnexpectedToken(String)

Unexpected token

§

UnexpectedBang(u8)

Unexpected <!>

§

TextNotFound

Text not found, expected Event::Text

§

XmlDeclWithoutVersion(Option<String>)

Event::BytesDecl must start with version attribute. Contains the attribute that was found or None if an xml declaration doesn’t contain attributes.

§

EmptyDocType

Empty Event::DocType. <!doctype foo> is correct but `<!doctype > is not.

See https://www.w3.org/TR/xml11/#NT-doctypedecl

§

InvalidAttr(AttrError)

Attribute parsing error

§

EscapeError(EscapeError)

Escape error

§

UnknownPrefix(Vec<u8>)

Specified namespace prefix is unknown, cannot resolve namespace for it

§

InvalidPrefixBind

Fields

§prefix: Vec<u8>

The prefix that is tried to be bound

§namespace: Vec<u8>

Namespace to which prefix tried to be bound

Error for when a reserved namespace is set incorrectly.

This error returned in following cases:

  • the XML document attempts to bind xml prefix to something other than http://www.w3.org/XML/1998/namespace
  • the XML document attempts to bind xmlns prefix
  • the XML document attempts to bind some prefix (except xml) to http://www.w3.org/XML/1998/namespace
  • the XML document attempts to bind some prefix to http://www.w3.org/2000/xmlns/

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AttrError> for Error

source§

fn from(error: AttrError) -> Error

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(error: Error) -> Error

Creates a new Error::Io from the given error

source§

impl From<EscapeError> for Error

source§

fn from(error: EscapeError) -> Error

Creates a new Error::EscapeError from the given error

source§

impl From<FromUtf8Error> for Error

source§

fn from(error: FromUtf8Error) -> Error

Creates a new Error::Utf8 from the given error

source§

impl From<Utf8Error> for Error

source§

fn from(error: Utf8Error) -> Error

Creates a new Error::NonDecodable from the given error

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.