Enum CreditLinkedSwapError
#[non_exhaustive]pub enum CreditLinkedSwapError {
NoLegs,
EmptyLeg {
index: usize,
role: LegRole,
},
AccumulatingLeg {
index: usize,
},
NonDeliverableLeg {
index: usize,
},
FixedRecovery(f64),
IndexCurveForeignLeg {
index: usize,
currency: Currency,
},
}Expand description
Why a credit-linked swap could not 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.
NoLegs
No legs at all.
EmptyLeg
A leg holds no coupon, so it pays on no date.
AccumulatingLeg
A leg accumulates into one payment rather than paying per coupon.
NonDeliverableLeg
A leg settles in a currency other than its own.
FixedRecovery(f64)
The fixed recovery is not a rate in [0, 1].
IndexCurveForeignLeg
A leg in a currency other than the trade’s, on an index curve: an index has one currency, so there is no curve for the leg to read.
Trait Implementations§
§impl Clone for CreditLinkedSwapError
impl Clone for CreditLinkedSwapError
§fn clone(&self) -> CreditLinkedSwapError
fn clone(&self) -> CreditLinkedSwapError
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 CreditLinkedSwapError
impl Debug for CreditLinkedSwapError
§impl Display for CreditLinkedSwapError
impl Display for CreditLinkedSwapError
§impl Error for CreditLinkedSwapError
impl Error for CreditLinkedSwapError
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 CreditLinkedSwapError
impl PartialEq for CreditLinkedSwapError
§fn eq(&self, other: &CreditLinkedSwapError) -> bool
fn eq(&self, other: &CreditLinkedSwapError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreditLinkedSwapError
Auto Trait Implementations§
impl Freeze for CreditLinkedSwapError
impl RefUnwindSafe for CreditLinkedSwapError
impl Send for CreditLinkedSwapError
impl Sync for CreditLinkedSwapError
impl Unpin for CreditLinkedSwapError
impl UnsafeUnpin for CreditLinkedSwapError
impl UnwindSafe for CreditLinkedSwapError
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