pub enum PwlCurveError {
NaN,
Empty,
NonMonotone,
ZeroTrade,
Infinity,
}
Expand description
Errors that can occur when creating or validating a PwlCurve
Variants§
NaN
Error when any coordinate value is NaN
Empty
Error when no points are provided
NonMonotone
Error when points violate the monotonicity requirement
ZeroTrade
Error when the curve’s domain does not include rate=0
Infinity
Error when a point has infinite rate or price
Trait Implementations§
Source§impl Debug for PwlCurveError
impl Debug for PwlCurveError
Source§impl Display for PwlCurveError
impl Display for PwlCurveError
Source§impl Error for PwlCurveError
impl Error for PwlCurveError
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()
Source§impl From<PwlCurveError> for DemandCurveError
impl From<PwlCurveError> for DemandCurveError
Source§fn from(source: PwlCurveError) -> Self
fn from(source: PwlCurveError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PwlCurveError
impl PartialEq for PwlCurveError
impl StructuralPartialEq for PwlCurveError
Auto Trait Implementations§
impl Freeze for PwlCurveError
impl RefUnwindSafe for PwlCurveError
impl Send for PwlCurveError
impl Sync for PwlCurveError
impl Unpin for PwlCurveError
impl UnwindSafe for PwlCurveError
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