Skip to main content

ErrorCode

Enum ErrorCode 

Source
#[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

§

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

§

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§

Source§

impl ErrorCode

Source

pub const fn from_repr(discriminant: i32) -> Option<ErrorCode>

Try to create Self from the raw representation

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorCode

Source§

impl Debug for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ErrorCode

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ErrorCode

Source§

impl Error for ErrorCode

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V