#[non_exhaustive]pub enum CompressionError<Fluid> {
OutletPressureLessThanInlet {
p_in: Pressure,
p_out: Pressure,
},
NonPhysicalWork {
outlet: State<Fluid>,
raw_work: SpecificEnthalpy,
},
ThermodynamicModelFailed {
context: String,
source: Box<dyn StdError + Send + Sync>,
},
}Expand description
Errors that may occur when calling a compressor model.
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.
OutletPressureLessThanInlet
The requested outlet pressure is less than the inlet pressure.
NonPhysicalWork
The computed target work is negative.
This is uncommon and is usually caused by very small pressure ratios combined with thermodynamic model numerical effects.
Includes the outlet state returned by the thermodynamic model so callers can decide how to recover without recomputing it.
ThermodynamicModelFailed
A thermodynamic model operation failed.
This failure can be from property evaluation or state construction.
Trait Implementations§
Source§impl<Fluid: Debug> Debug for CompressionError<Fluid>
impl<Fluid: Debug> Debug for CompressionError<Fluid>
Source§impl<Fluid> Display for CompressionError<Fluid>
impl<Fluid> Display for CompressionError<Fluid>
Source§impl<Fluid> Error for CompressionError<Fluid>
impl<Fluid> Error for CompressionError<Fluid>
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<Fluid> Freeze for CompressionError<Fluid>where
Fluid: Freeze,
impl<Fluid> !RefUnwindSafe for CompressionError<Fluid>
impl<Fluid> Send for CompressionError<Fluid>where
Fluid: Send,
impl<Fluid> Sync for CompressionError<Fluid>where
Fluid: Sync,
impl<Fluid> Unpin for CompressionError<Fluid>where
Fluid: Unpin,
impl<Fluid> UnsafeUnpin for CompressionError<Fluid>where
Fluid: UnsafeUnpin,
impl<Fluid> !UnwindSafe for CompressionError<Fluid>
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