pub enum UpfError {
Io(Error),
Xml(String),
MissingElement {
element: String,
},
MissingAttribute {
element: String,
attribute: String,
},
InvalidAttribute {
element: String,
attribute: String,
value: String,
expected: String,
},
InvalidData {
element: String,
reason: String,
},
}Expand description
Error type returned by UPF parsing and normalization operations. Errors returned while normalizing or parsing a Unified Pseudopotential Format (UPF) document.
Variants§
Io(Error)
Filesystem or reader error.
Xml(String)
XML tokenization or tree-construction error after normalization.
MissingElement
A required UPF element is missing.
MissingAttribute
A required attribute is missing from an element.
InvalidAttribute
An attribute exists but could not be converted to the expected type.
InvalidData
Element text or numeric payload could not be interpreted.
Trait Implementations§
Source§impl Error for UpfError
impl Error for UpfError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for UpfError
impl !RefUnwindSafe for UpfError
impl Send for UpfError
impl Sync for UpfError
impl Unpin for UpfError
impl UnsafeUnpin for UpfError
impl !UnwindSafe for UpfError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more