Enum CalcMethodError
#[non_exhaustive]pub enum CalcMethodError {
UnknownCode(u16),
Retired(u16),
KindMismatch {
code: u16,
method_kind: BondKind,
booked_as: BondKind,
},
FloorOnInterestIndexed {
instrument_id: String,
},
UnimplementedCapability {
instrument_id: String,
capability: &'static str,
},
}Expand description
Calc-type resolution failure.
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.
UnknownCode(u16)
The code is not in the curated registry.
Retired(u16)
The code is retired (“no longer in use” per the vendor help page).
KindMismatch
The code exists but applies to the other instrument kind.
Fields
FloorOnInterestIndexed
A redemption-floor override on an interest-indexed linker static — interest-indexed bonds redeem unindexed par, so a floor is meaningless.
UnimplementedCapability
The static declares a capability the pricing layer does not implement — materialising it as a plain instrument would price the wrong thing silently, which is worse than refusing.
Trait Implementations§
§impl Clone for CalcMethodError
impl Clone for CalcMethodError
§fn clone(&self) -> CalcMethodError
fn clone(&self) -> CalcMethodError
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 CalcMethodError
impl Debug for CalcMethodError
§impl Display for CalcMethodError
impl Display for CalcMethodError
impl Eq for CalcMethodError
§impl Error for CalcMethodError
impl Error for CalcMethodError
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 CalcMethodError
impl PartialEq for CalcMethodError
impl StructuralPartialEq for CalcMethodError
Auto Trait Implementations§
impl Freeze for CalcMethodError
impl RefUnwindSafe for CalcMethodError
impl Send for CalcMethodError
impl Sync for CalcMethodError
impl Unpin for CalcMethodError
impl UnsafeUnpin for CalcMethodError
impl UnwindSafe for CalcMethodError
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