Enum FxVolError
#[non_exhaustive]pub enum FxVolError {
Malformed(&'static str),
Empty,
UnknownQuote(String),
UnreachableDelta {
delta: f64,
},
NodeStrikesNotOrdered,
DeltaLabelDidNotConverge {
delta: f64,
},
ParameterCountMismatch {
expected: usize,
given: usize,
},
}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)
No nodes, a delta outside (0, 1), a non-positive vol, a repeated
quote, smiles that do not quote the same deltas, or unsorted /
duplicate expiries.
Empty
No smile for the pair at any expiry.
UnknownQuote(String)
A quote spelling that is not ATM, a put <pct>P or a call <pct>C
at a delta in (0, 1), or a quote the surface does not carry.
UnreachableDelta
A quoted delta no strike reaches under the convention.
NodeStrikesNotOrdered
The node strikes a smile resolved to are not strictly increasing, so the smile cannot be read in strike space.
DeltaLabelDidNotConverge
A delta label did not settle on a strike against the smile.
ParameterCountMismatch
A substituted view was handed the wrong number of parameters.
Trait Implementations§
§impl Clone for FxVolError
impl Clone for FxVolError
§fn clone(&self) -> FxVolError
fn clone(&self) -> FxVolError
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 FxVolError
impl Debug for FxVolError
§impl Display for FxVolError
impl Display for FxVolError
§impl Error for FxVolError
impl Error for FxVolError
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<FxVolError> for MarketDataError
impl From<FxVolError> for MarketDataError
§fn from(e: FxVolError) -> Self
fn from(e: FxVolError) -> Self
Converts to this type from the input type.
§impl PartialEq for FxVolError
impl PartialEq for FxVolError
impl StructuralPartialEq for FxVolError
Auto Trait Implementations§
impl Freeze for FxVolError
impl RefUnwindSafe for FxVolError
impl Send for FxVolError
impl Sync for FxVolError
impl Unpin for FxVolError
impl UnsafeUnpin for FxVolError
impl UnwindSafe for FxVolError
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