pub enum YieldCurveError {
InsufficientData {
method: &'static str,
need: usize,
got: usize,
},
InvalidPoint(String),
FitFailed(String),
InvalidTimeRange(String),
}Expand description
Errors returned by curve construction.
Variants§
InsufficientData
Not enough points for the requested method.
InvalidPoint(String)
A point failed validation (NaN/infinite, negative x, duplicate x).
FitFailed(String)
Parametric fit (Nelson-Siegel, Svensson) did not converge or produced implausible parameters.
InvalidTimeRange(String)
Forward-rate computation received t1 >= t2, non-finite times, or
produced a non-finite result (e.g. taking a negative discount factor
to a fractional power).
Trait Implementations§
Source§impl Clone for YieldCurveError
impl Clone for YieldCurveError
Source§fn clone(&self) -> YieldCurveError
fn clone(&self) -> YieldCurveError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for YieldCurveError
impl Debug for YieldCurveError
Source§impl Display for YieldCurveError
impl Display for YieldCurveError
impl Eq for YieldCurveError
Source§impl Error for YieldCurveError
impl Error for YieldCurveError
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 PartialEq for YieldCurveError
impl PartialEq for YieldCurveError
Source§fn eq(&self, other: &YieldCurveError) -> bool
fn eq(&self, other: &YieldCurveError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for YieldCurveError
Auto Trait Implementations§
impl Freeze for YieldCurveError
impl RefUnwindSafe for YieldCurveError
impl Send for YieldCurveError
impl Sync for YieldCurveError
impl Unpin for YieldCurveError
impl UnsafeUnpin for YieldCurveError
impl UnwindSafe for YieldCurveError
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