Enum RateVolError
#[non_exhaustive]pub enum RateVolError {
Malformed(&'static str),
WrongStrikeAxis {
asked: &'static str,
carried: &'static str,
},
ParameterCountMismatch {
expected: usize,
given: usize,
},
NeedsForward {
read: &'static str,
},
Sabr(SabrError),
}Expand description
A surface that cannot be built or cannot answer.
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.
Malformed(&'static str)
An empty or non-ascending axis, a ragged grid, or a non-finite or non-positive vol.
WrongStrikeAxis
A read named a coordinate the surface’s strike axis does not carry.
Fields
ParameterCountMismatch
A substituted view was handed the wrong number of parameters.
NeedsForward
A SABR smile was asked for a read that names no forward — a model smile is a function of the forward as well as the strike.
Sabr(SabrError)
The SABR formula or its ATM solve refused the inputs.
Trait Implementations§
§impl Clone for RateVolError
impl Clone for RateVolError
§fn clone(&self) -> RateVolError
fn clone(&self) -> RateVolError
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 RateVolError
impl Debug for RateVolError
§impl Display for RateVolError
impl Display for RateVolError
§impl Error for RateVolError
impl Error for RateVolError
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<RateVolError> for MarketDataError
impl From<RateVolError> for MarketDataError
§fn from(e: RateVolError) -> Self
fn from(e: RateVolError) -> Self
Converts to this type from the input type.
§impl PartialEq for RateVolError
impl PartialEq for RateVolError
impl StructuralPartialEq for RateVolError
Auto Trait Implementations§
impl Freeze for RateVolError
impl RefUnwindSafe for RateVolError
impl Send for RateVolError
impl Sync for RateVolError
impl Unpin for RateVolError
impl UnsafeUnpin for RateVolError
impl UnwindSafe for RateVolError
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