Enum XccyTemplateError
#[non_exhaustive]pub enum XccyTemplateError {
UnknownIndex {
code: String,
},
NotARateIndex {
code: String,
},
NotOvernight {
code: String,
},
UnsupportedTenor {
code: String,
},
OneCurrency {
currency: String,
},
NotALeg {
code: String,
},
InitialExchangeOnResetting,
Deliverable {
template: String,
},
NoSettlement {
family: &'static str,
},
NotCrossCurrency {
family: &'static str,
},
NotACsa {
given: String,
},
NoDefaultCsa {
currency: String,
},
}Expand description
Why a customised cross-currency template could not be built.
Raised where the template is built, not where it is priced: a template that cannot be priced is refused next to its cause.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownIndex
The code names no registered index.
NotARateIndex
The index is registered but is neither an overnight nor an IBOR index, so a leg cannot project on it.
NotOvernight
A collateral must be an overnight index: a CSA pays its overnight rate.
UnsupportedTenor
The index’s tenor is not one a leg can pay on.
OneCurrency
A cross-currency swap’s two legs must be in different currencies.
NotALeg
A leg was stated by a code that is neither an index nor a currency.
InitialExchangeOnResetting
A resetting notional is exchanged at every reset, so the initial exchange is not the template’s to switch.
Deliverable
A deliverable template has no settlement currency to change.
NoSettlement
The template’s family settles in its own currency.
NotCrossCurrency
The template is not a cross-currency one.
NotACsa
A CSA argument is neither a collateral currency nor an overnight index.
NoDefaultCsa
A CSA was named by a currency that ships no own-collateral recipe on an overnight index, so there is no default index to read it as.
Trait Implementations§
§impl Clone for XccyTemplateError
impl Clone for XccyTemplateError
§fn clone(&self) -> XccyTemplateError
fn clone(&self) -> XccyTemplateError
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 XccyTemplateError
impl Debug for XccyTemplateError
§impl Display for XccyTemplateError
impl Display for XccyTemplateError
impl Eq for XccyTemplateError
§impl Error for XccyTemplateError
impl Error for XccyTemplateError
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 PartialEq for XccyTemplateError
impl PartialEq for XccyTemplateError
§fn eq(&self, other: &XccyTemplateError) -> bool
fn eq(&self, other: &XccyTemplateError) -> bool
self and other values to be equal, and is used by ==.