#[non_exhaustive]pub enum Error {
Show 27 variants
MissingField(&'static str),
ShortRow {
field: &'static str,
row: usize,
expected: usize,
got: usize,
},
BadFloat {
field: &'static str,
row: usize,
value: String,
},
UnbalancedBrackets(&'static str),
UnknownBus {
bus_id: BusId,
element_index: usize,
},
ZeroImpedance {
row: usize,
},
NonFiniteSusceptance {
row: usize,
},
DimensionMismatch {
n: usize,
b_len: usize,
},
NoGenerators,
MissingGenCost {
gen_index: usize,
},
UnsupportedCostModel {
gen_index: usize,
model: u8,
ncost: usize,
},
GenCostCountMismatch {
gens: usize,
gencost: usize,
},
ReferenceBusCount {
found: usize,
},
InvalidBaseMva {
base: f64,
},
ShapeMismatch {
what: &'static str,
expected: usize,
got: usize,
},
SingularNetwork,
UngroundedComponent {
components: usize,
},
Io(Error),
Mtx(String),
Parquet(String),
EmptyScenarioBatch,
ScenarioIdOverflow {
base: i64,
index: usize,
},
NormalizedGridfmSnapshot {
scenario: i64,
},
NonFiniteGridfmValue {
scenario: i64,
element: &'static str,
row: usize,
field: &'static str,
value: f64,
},
ScenarioShapeMismatch {
index: usize,
reason: ScenarioMismatch,
},
FormatRead {
format: &'static str,
message: String,
},
UnknownFormat(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingField(&'static str)
ShortRow
BadFloat
UnbalancedBrackets(&'static str)
UnknownBus
ZeroImpedance
NonFiniteSusceptance
DimensionMismatch
NoGenerators
MissingGenCost
UnsupportedCostModel
GenCostCountMismatch
ReferenceBusCount
InvalidBaseMva
ShapeMismatch
SingularNetwork
UngroundedComponent
Io(Error)
Mtx(String)
Parquet(String)
EmptyScenarioBatch
ScenarioIdOverflow
NormalizedGridfmSnapshot
NonFiniteGridfmValue
ScenarioShapeMismatch
Fields
§
index: usize0-based position of the offending snapshot in the batch (independent of the snapshot’s scenario id).
§
reason: ScenarioMismatchFormatRead
UnknownFormat(String)
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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