pub enum PcError {
DimensionMismatch {
expected: usize,
got: usize,
context: &'static str,
},
ConfigValidation(String),
Serialization(String),
Io(Error),
}Expand description
Crate-wide error type for pc_rl_core.
§Examples
use pc_rl_core::error::PcError;
let err = PcError::ConfigValidation("bad topology".to_string());
assert!(format!("{err}").contains("bad topology"));Variants§
DimensionMismatch
Matrix or vector dimension mismatch.
Fields
ConfigValidation(String)
Configuration validation failure.
Serialization(String)
JSON serialization/deserialization error.
Io(Error)
File I/O error.
Trait Implementations§
Source§impl Error for PcError
impl Error for PcError
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 PcError
impl !RefUnwindSafe for PcError
impl Send for PcError
impl Sync for PcError
impl Unpin for PcError
impl UnsafeUnpin for PcError
impl !UnwindSafe for PcError
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