Enum SpreadSolveError
#[non_exhaustive]pub enum SpreadSolveError {
Unbracketed {
lo: f64,
hi: f64,
},
Unconverged {
residual: f64,
iterations: usize,
},
Curve(CurveError),
}Expand description
Why a spread could not be implied from a price.
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.
Unbracketed
No spread in the searched bracket reprices the quote.
Unconverged
The iteration cap was reached with this price residual outstanding.
Fields
Curve(CurveError)
A curve query failed — a flow before the curve’s reference date, or a non-finite parameter.
Implementations§
§impl SpreadSolveError
impl SpreadSolveError
pub fn is_unsolved(&self) -> bool
pub fn is_unsolved(&self) -> bool
Whether the solve found no spread — none in the bracket, or none within the iteration cap — rather than a curve query failing. Exhaustive.
Trait Implementations§
§impl Clone for SpreadSolveError
impl Clone for SpreadSolveError
§fn clone(&self) -> SpreadSolveError
fn clone(&self) -> SpreadSolveError
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 SpreadSolveError
impl Debug for SpreadSolveError
§impl Display for SpreadSolveError
impl Display for SpreadSolveError
§impl Error for SpreadSolveError
impl Error for SpreadSolveError
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<CurveError> for SpreadSolveError
impl From<CurveError> for SpreadSolveError
§fn from(e: CurveError) -> Self
fn from(e: CurveError) -> Self
Converts to this type from the input type.
§impl PartialEq for SpreadSolveError
impl PartialEq for SpreadSolveError
§fn eq(&self, other: &SpreadSolveError) -> bool
fn eq(&self, other: &SpreadSolveError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpreadSolveError
Auto Trait Implementations§
impl Freeze for SpreadSolveError
impl RefUnwindSafe for SpreadSolveError
impl Send for SpreadSolveError
impl Sync for SpreadSolveError
impl Unpin for SpreadSolveError
impl UnsafeUnpin for SpreadSolveError
impl UnwindSafe for SpreadSolveError
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