Enum BondFutureError
#[non_exhaustive]pub enum BondFutureError {
EmptyBasket,
AmortisingDeliverable {
key: String,
},
NonPositiveConversionFactor {
isin: String,
},
UnknownDeliverable {
isin: String,
},
NotFixedCoupon {
isin: String,
},
DeliveryNotAfterValuation {
valuation: NaiveDate,
delivery: NaiveDate,
},
Pricing(PricingError),
}Expand description
A bond future that cannot be analysed.
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.
EmptyBasket
The basket is empty.
AmortisingDeliverable
A deliverable pays principal down before maturity: a conversion factor is defined on a bullet.
NonPositiveConversionFactor
A conversion factor is not finite and strictly positive.
UnknownDeliverable
A deliverable ISIN is absent from the security master.
NotFixedCoupon
A deliverable’s static does not describe a fixed-coupon bond.
DeliveryNotAfterValuation
Delivery is on or before the valuation date.
Pricing(PricingError)
A curve the analysis needs could not be resolved or answer.
Implementations§
§impl BondFutureError
impl BondFutureError
pub fn is_caller_input(&self) -> bool
pub fn is_caller_input(&self) -> bool
Whether the caller’s input was wrong — an empty or unusable basket, a delivery not after valuation — rather than a pricing failure.
Trait Implementations§
§impl Clone for BondFutureError
impl Clone for BondFutureError
§fn clone(&self) -> BondFutureError
fn clone(&self) -> BondFutureError
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 BondFutureError
impl Debug for BondFutureError
§impl Display for BondFutureError
impl Display for BondFutureError
§impl Error for BondFutureError
impl Error for BondFutureError
§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<PricingError> for BondFutureError
impl From<PricingError> for BondFutureError
§fn from(e: PricingError) -> Self
fn from(e: PricingError) -> Self
Converts to this type from the input type.
§impl PartialEq for BondFutureError
impl PartialEq for BondFutureError
impl StructuralPartialEq for BondFutureError
Auto Trait Implementations§
impl Freeze for BondFutureError
impl RefUnwindSafe for BondFutureError
impl Send for BondFutureError
impl Sync for BondFutureError
impl Unpin for BondFutureError
impl UnsafeUnpin for BondFutureError
impl UnwindSafe for BondFutureError
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