#[repr(i32)]pub enum ErrorCode {
Show 68 variants
InvalidHandle = -1,
Ok = 0,
InsufficientMemory = 101,
NoNetworkData = 102,
HydraulicSolverNotOpened = 103,
NoHydraulicsForQuality = 104,
QualitySolverNotOpened = 105,
NoResultsSaved = 106,
HydraulicsFromExternalFile = 107,
ExternalFileConflict = 108,
CannotSolveHydraulics = 110,
CannotSolveQuality = 120,
InputError = 200,
SyntaxError = 201,
IllegalNumericValue = 202,
UndefinedNode = 203,
UndefinedLink = 204,
UndefinedPattern = 205,
UndefinedCurve = 206,
IllegalValveControl = 207,
IllegalPdaPressureLimits = 208,
IllegalNodeProperty = 209,
IllegalLinkProperty = 211,
UndefinedTraceNode = 212,
InvalidOptionValue = 213,
LineTooLong = 214,
DuplicateId = 215,
UndefinedPump = 216,
InvalidPumpEnergyData = 217,
IllegalValveToTank = 219,
IllegalValveToValve = 220,
MisplacedRuleClause = 221,
LinkSameStartEnd = 222,
NotEnoughNodes = 223,
NoTanksOrReservoirs = 224,
InvalidTankLevels = 225,
NoPumpCurveOrPower = 226,
InvalidPumpCurve = 227,
NonincreasingCurveX = 230,
NoCurveData = 231,
NoPatternData = 232,
UnconnectedNodes = 233,
NonexistentQualitySource = 240,
NonexistentControl = 241,
InvalidFormat = 250,
InvalidParameterCode = 251,
InvalidIdName = 252,
NonexistentDemandCategory = 253,
NodeNoCoordinates = 254,
LinkNoVertices = 255,
NonexistentRule = 257,
NonexistentRuleClause = 258,
DeleteNodeWithLinks = 259,
DeleteTraceNode = 260,
DeleteNodeOrLinkInControl = 261,
ModifyWhileSolverOpen = 262,
NotATank = 263,
NotAValve = 264,
InvalidSectionKeyword = 299,
IdenticalFileNames = 301,
CannotOpenInputFile = 302,
CannotOpenReportFile = 303,
CannotOpenOutputFile = 304,
CannotOpenHydraulicsFile = 305,
HydraulicsFileMismatch = 306,
CannotReadHydraulicsFile = 307,
CannotSaveBinaryResults = 308,
CannotSaveReportResults = 309,
}Expand description
EPANET toolkit error/warning codes.
Values match the official EPANET 2.3 error numbering. See: http://wateranalytics.org/EPANET/group___error_codes.html
Uses #[repr(i32)] so the enum is ABI-compatible with c_int.
Variants§
InvalidHandle = -1
Ok = 0
InsufficientMemory = 101
NoNetworkData = 102
HydraulicSolverNotOpened = 103
NoHydraulicsForQuality = 104
QualitySolverNotOpened = 105
NoResultsSaved = 106
HydraulicsFromExternalFile = 107
ExternalFileConflict = 108
CannotSolveHydraulics = 110
CannotSolveQuality = 120
InputError = 200
SyntaxError = 201
IllegalNumericValue = 202
UndefinedNode = 203
UndefinedLink = 204
UndefinedPattern = 205
UndefinedCurve = 206
IllegalValveControl = 207
IllegalPdaPressureLimits = 208
IllegalNodeProperty = 209
IllegalLinkProperty = 211
UndefinedTraceNode = 212
InvalidOptionValue = 213
LineTooLong = 214
DuplicateId = 215
UndefinedPump = 216
InvalidPumpEnergyData = 217
IllegalValveToTank = 219
IllegalValveToValve = 220
MisplacedRuleClause = 221
LinkSameStartEnd = 222
NotEnoughNodes = 223
NoTanksOrReservoirs = 224
InvalidTankLevels = 225
NoPumpCurveOrPower = 226
InvalidPumpCurve = 227
NonincreasingCurveX = 230
NoCurveData = 231
NoPatternData = 232
UnconnectedNodes = 233
NonexistentQualitySource = 240
NonexistentControl = 241
InvalidFormat = 250
InvalidParameterCode = 251
InvalidIdName = 252
NonexistentDemandCategory = 253
NodeNoCoordinates = 254
LinkNoVertices = 255
NonexistentRule = 257
NonexistentRuleClause = 258
DeleteNodeWithLinks = 259
DeleteTraceNode = 260
DeleteNodeOrLinkInControl = 261
ModifyWhileSolverOpen = 262
NotATank = 263
NotAValve = 264
InvalidSectionKeyword = 299
IdenticalFileNames = 301
CannotOpenInputFile = 302
CannotOpenReportFile = 303
CannotOpenOutputFile = 304
CannotOpenHydraulicsFile = 305
HydraulicsFileMismatch = 306
CannotReadHydraulicsFile = 307
CannotSaveBinaryResults = 308
CannotSaveReportResults = 309
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
Source§impl Error for ErrorCode
impl Error for ErrorCode
1.30.0 · 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()
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Forget for ErrorCode
impl Freeze for ErrorCode
impl Move for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
impl<T> Boilerplate for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more