pub enum CoreError {
Io {
path: PathBuf,
source: Error,
},
Zip(String),
Xml {
part: String,
message: String,
},
MissingPart(String),
Path(String),
Formula(String),
Patch(String),
Update(String),
Invalid(String),
}Expand description
Errors produced by the shared OPC / XML layers.
Variants§
Io
Filesystem I/O failure, annotated with the path involved.
Zip(String)
The file is not a readable ZIP/OPC package.
Xml
An XML part failed to parse.
MissingPart(String)
A required package part is missing.
Path(String)
A node path did not resolve.
Formula(String)
An XML formula or selector failed to parse or evaluate.
Patch(String)
An RFC 5261 XML patch failed to parse or apply.
Update(String)
An XQuery Update expression failed to parse or compile.
Invalid(String)
Any other invariant violation.
Implementations§
Source§impl CoreError
impl CoreError
Sourcepub fn io(path: impl Into<PathBuf>, source: Error) -> Self
pub fn io(path: impl Into<PathBuf>, source: Error) -> Self
Construct an CoreError::Io from a path and source error.
Sourcepub fn xml(part: impl Into<String>, message: impl Into<String>) -> Self
pub fn xml(part: impl Into<String>, message: impl Into<String>) -> Self
Construct an CoreError::Xml from a part name and message.
Sourcepub fn invalid(msg: impl Into<String>) -> Self
pub fn invalid(msg: impl Into<String>) -> Self
Construct an CoreError::Invalid.
Sourcepub fn formula(msg: impl Into<String>) -> Self
pub fn formula(msg: impl Into<String>) -> Self
Construct an CoreError::Formula.
Sourcepub fn patch(msg: impl Into<String>) -> Self
pub fn patch(msg: impl Into<String>) -> Self
Construct an CoreError::Patch.
Sourcepub fn update(msg: impl Into<String>) -> Self
pub fn update(msg: impl Into<String>) -> Self
Construct an CoreError::Update.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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 !RefUnwindSafe for CoreError
impl !UnwindSafe for CoreError
impl Freeze for CoreError
impl Send for CoreError
impl Sync for CoreError
impl Unpin for CoreError
impl UnsafeUnpin for CoreError
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