Enum minidom_ext::Error[][src]

pub enum Error {
    AttributeNotFound(StringString),
    NoChildrenFound(String),
    NoChildren(StringString),
    MultipleChildrenFound(Stringusize),
    MultipleChildren(StringStringusize),
    ParseError {
        element_name: String,
        attribute_name: String,
        value: String,
        source: Error,
    },
}
Expand description

Error type for minidom_ext

Variants

AttributeNotFound(StringString)

Tuple Fields

0: String
1: String

Returned when the attribute could not be found by name. First parameter is the element’s name, second parameter is attribute’s name.

NoChildrenFound(String)

Tuple Fields

0: String

Returned when no children can be matched with the predicate. First parameter is the element’s name.

NoChildren(StringString)

Tuple Fields

0: String
1: String

Returned when no children can be matched with the expected child’s name. First parameter is the element’s name, second parameter is the child’s name.

MultipleChildrenFound(Stringusize)

Tuple Fields

0: String
1: usize

Returned when multiple children can be matched with the predicate. First parameter is the element’s name, second parameter is the number of matching children found.

MultipleChildren(StringStringusize)

Tuple Fields

0: String
1: String
2: usize

Returned when multiple children can be matched with the expected child’s name. First parameter is the element’s name, second parameter is the child’s name, third parameter is the number of matching children found.

ParseError

Fields

element_name: String

Element’s name

attribute_name: String

Attribute’s name

value: String

Value of the attribute

source: Error

Original parsing error. The specific type depends on what type the value is parsed into. For example, if parsing into a i64 fails, the returned error would be of type ParseIntError.

Returned when the attribute cannot be parsed or convert into the expected type.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.