pub enum TypeError {
InvalidDate {
year: i32,
month: u32,
day: u32,
},
NonPositiveRange,
NonFinite {
name: &'static str,
},
InvalidTenor {
reason: &'static str,
},
}Expand description
Variants§
InvalidDate
Date::from_ymd received an invalid
calendar date (out-of-range month/day, or a day that does not exist
in the given month — e.g. February 30).
NonPositiveRange
A non-positive day count was requested where a positive value is
required (e.g. day-count year fraction across a zero or negative
range, or a degenerate compounding t <= 0 for rate_from_discount).
NonFinite
A non-finite (NaN or infinite) number was supplied where a finite
value is required.
InvalidTenor
A frequency or tenor count is invalid (zero, negative for a unit that
requires positive, or otherwise out of range — including
Daycount::Business252 queried without a calendar).
Trait Implementations§
impl Copy for TypeError
impl Eq for TypeError
Source§impl Error for TypeError
impl Error for TypeError
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<TypeError> for CurveError
impl From<TypeError> for CurveError
Source§impl From<TypeError> for BootstrapError
impl From<TypeError> for BootstrapError
impl StructuralPartialEq for TypeError
Auto Trait Implementations§
impl Freeze for TypeError
impl RefUnwindSafe for TypeError
impl Send for TypeError
impl Sync for TypeError
impl Unpin for TypeError
impl UnsafeUnpin for TypeError
impl UnwindSafe for TypeError
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