Enum CrossCurrencyError
#[non_exhaustive]pub enum CrossCurrencyError {
OwnCurvesNonDeliverable,
ResettingNonDeliverable {
template: String,
},
LegSettlement {
template: String,
leg: String,
settlement: String,
},
TwoConvertingLegs {
template: String,
},
Settlement {
template: String,
error: NonDeliverableError,
},
AccretionMode {
template: String,
currency: String,
},
MtmWithoutFxIndex {
template: String,
},
Currency {
template: String,
code: String,
},
FxRate {
template: String,
fx_rate: f64,
},
}Expand description
Why a cross-currency template cannot become a swap.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OwnCurvesNonDeliverable
A non-deliverable swap put on its legs’ own curves: it settles in one currency, on that currency’s curve.
ResettingNonDeliverable
A non-deliverable template resets a notional: a resetting leg’s principal steps are set by forwards, not dated conversions of a known amount, and no market convention defines the combination.
LegSettlement
A leg of a non-deliverable template neither pays in the settlement currency nor carries an FX source converting into it — or pays in it and carries one.
Fields
TwoConvertingLegs
Both legs of a non-deliverable template convert: the both-legs-converting form, which reads two local curves under the settlement collateral where the pricing view holds one. Deferred, not omitted.
Settlement
The reference leg refused its conversions.
AccretionMode
The template folds the spread into the daily compounding, which the leg builder does not do.
MtmWithoutFxIndex
The template resets a notional but names no FX index to say which.
Currency
A currency code on the template does not parse.
FxRate
The agreed FX rate is zero, negative or not finite.
Trait Implementations§
§impl Clone for CrossCurrencyError
impl Clone for CrossCurrencyError
§fn clone(&self) -> CrossCurrencyError
fn clone(&self) -> CrossCurrencyError
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 CrossCurrencyError
impl Debug for CrossCurrencyError
§impl Display for CrossCurrencyError
impl Display for CrossCurrencyError
§impl Error for CrossCurrencyError
impl Error for CrossCurrencyError
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()
§impl From<CrossCurrencyError> for RungBuildError
impl From<CrossCurrencyError> for RungBuildError
§fn from(e: CrossCurrencyError) -> Self
fn from(e: CrossCurrencyError) -> Self
§impl PartialEq for CrossCurrencyError
impl PartialEq for CrossCurrencyError
§fn eq(&self, other: &CrossCurrencyError) -> bool
fn eq(&self, other: &CrossCurrencyError) -> bool
self and other values to be equal, and is used by ==.