Enum SwaptionError
#[non_exhaustive]pub enum SwaptionError {
EmptyFixedLeg,
NonFiniteStrike,
ExpiryNotBeforeMaturity {
expiry: NaiveDate,
maturity: NaiveDate,
},
NoExerciseDates,
ExerciseDatesNotAscending,
MixedFixedRates,
}Expand description
A swaption that cannot be built.
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.
EmptyFixedLeg
The underlying’s fixed leg has no coupon to write an option on.
NonFiniteStrike
The strike is not a finite number.
ExpiryNotBeforeMaturity
The option expires on or after the underlying’s last fixed payment.
Fields
NoExerciseDates
A Bermudan needs at least one exercise date.
ExerciseDatesNotAscending
The exercise dates are not strictly ascending.
MixedFixedRates
A callable swap’s fixed coupons do not share one rate, so no single strike cancels it.
Trait Implementations§
§impl Clone for SwaptionError
impl Clone for SwaptionError
§fn clone(&self) -> SwaptionError
fn clone(&self) -> SwaptionError
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 more§impl Debug for SwaptionError
impl Debug for SwaptionError
§impl Display for SwaptionError
impl Display for SwaptionError
§impl Error for SwaptionError
impl Error for SwaptionError
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()
§impl PartialEq for SwaptionError
impl PartialEq for SwaptionError
impl StructuralPartialEq for SwaptionError
Auto Trait Implementations§
impl Freeze for SwaptionError
impl RefUnwindSafe for SwaptionError
impl Send for SwaptionError
impl Sync for SwaptionError
impl Unpin for SwaptionError
impl UnsafeUnpin for SwaptionError
impl UnwindSafe for SwaptionError
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