Enum SwapLegsError
#[non_exhaustive]pub enum SwapLegsError {
EmptyLeg {
leg: &'static str,
},
Accumulating {
leg: &'static str,
},
FloatingOnFixedLeg {
index: String,
},
FixedOnFloatingLeg,
IndexedCoupon {
index: String,
},
RangeAccrualCoupon {
index: String,
},
NoFloatingCoupon,
TwoIndices {
first: String,
second: String,
},
CurrencyMismatch {
first: Currency,
second: Currency,
},
SameSide {
direction: Direction,
},
}Expand description
Why two legs do not make a fixed-versus-floating swap.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyLeg
A leg has no coupons.
Accumulating
A leg accumulates its coupons into one payment: that is a zero-coupon swap’s leg, and a zero-coupon swap is its own product.
FloatingOnFixedLeg
The fixed leg carries a coupon that resets on an index.
FixedOnFloatingLeg
The floating leg carries a fixed coupon.
IndexedCoupon
A leg carries a coupon scaled by a price index, which a fixed-versus-floating swap has no side for.
RangeAccrualCoupon
The floating leg carries a range accrual, which pays a fixed rate on the days its index lies in range rather than the index itself.
NoFloatingCoupon
The floating leg carries no coupon that resets on an index.
TwoIndices
The floating leg’s coupons reset on two indices, or read one index both as a term rate and as an overnight strip.
CurrencyMismatch
Two coupons pay in different currencies.
Fields
SameSide
Both legs are on the same side: nothing is exchanged.
Trait Implementations§
§impl Clone for SwapLegsError
impl Clone for SwapLegsError
§fn clone(&self) -> SwapLegsError
fn clone(&self) -> SwapLegsError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SwapLegsError
impl Debug for SwapLegsError
§impl Display for SwapLegsError
impl Display for SwapLegsError
§impl Error for SwapLegsError
impl Error for SwapLegsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()