Enum RungBuildError
#[non_exhaustive]pub enum RungBuildError {
UnknownTemplate {
code: String,
},
NotCrossCurrency {
code: String,
family: &'static str,
},
CountMismatch {
tenors: usize,
quotes: usize,
},
Swap(CrossCurrencyError),
NotSwap {
code: String,
family: &'static str,
},
Build(String),
NotFamily {
code: String,
family: &'static str,
wanted: &'static str,
},
Contract(String),
}Expand description
Why a basis ladder could not be built from a template.
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.
UnknownTemplate
No template is registered under the code.
NotCrossCurrency
The code names a template of another family.
CountMismatch
Tenors and quotes differ in count.
Swap(CrossCurrencyError)
The template builds no basis swap of the requested shape.
NotSwap
The code names a template of a family that builds no par swap.
Build(String)
The template’s swap refused to build at one tenor, in its own words.
NotFamily
A builder was handed a template of another family: wanted names the
family the builder reads.
Fields
Contract(String)
A futures contract spelling the template cannot date: not an IMM code, a month off the template’s cycle, or a window that does not run forward.
Trait Implementations§
§impl Clone for RungBuildError
impl Clone for RungBuildError
§fn clone(&self) -> RungBuildError
fn clone(&self) -> RungBuildError
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 RungBuildError
impl Debug for RungBuildError
§impl Display for RungBuildError
impl Display for RungBuildError
§impl Error for RungBuildError
impl Error for RungBuildError
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 From<CrossCurrencyError> for RungBuildError
impl From<CrossCurrencyError> for RungBuildError
§fn from(e: CrossCurrencyError) -> Self
fn from(e: CrossCurrencyError) -> Self
Converts to this type from the input type.
§impl From<RungBuildError> for CalibrationError
impl From<RungBuildError> for CalibrationError
§fn from(e: RungBuildError) -> Self
fn from(e: RungBuildError) -> Self
Converts to this type from the input type.
§impl From<RungBuildError> for RecipeQuoteError
impl From<RungBuildError> for RecipeQuoteError
§fn from(e: RungBuildError) -> Self
fn from(e: RungBuildError) -> Self
Converts to this type from the input type.
§impl PartialEq for RungBuildError
impl PartialEq for RungBuildError
impl StructuralPartialEq for RungBuildError
Auto Trait Implementations§
impl Freeze for RungBuildError
impl RefUnwindSafe for RungBuildError
impl Send for RungBuildError
impl Sync for RungBuildError
impl Unpin for RungBuildError
impl UnsafeUnpin for RungBuildError
impl UnwindSafe for RungBuildError
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