Enum SnapshotError
#[non_exhaustive]pub enum SnapshotError {
Gaps(Vec<Gap>),
FromTheFuture {
what: String,
observed: NaiveDate,
as_of: NaiveDate,
},
Source(SourceError),
Recipe(RecipeSpecError),
Calibration {
key: CollateralSpec,
error: Box<CalibrationError>,
},
Pricing(PricingError),
Malformed(String),
}Expand description
Why a snapshot built no market.
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.
Gaps(Vec<Gap>)
What the demand named and the data did not carry — every one of them.
FromTheFuture
A strip or spot observed after the market’s as_of.
Fields
Source(SourceError)
The source failed.
Recipe(RecipeSpecError)
A recipe the source supplied was refused.
Calibration
The data arrived and a curve still did not solve.
Pricing(PricingError)
The book could not state its demand.
Malformed(String)
The data does not form a market (a fixing printed twice, two values).
Trait Implementations§
§impl Clone for SnapshotError
impl Clone for SnapshotError
§fn clone(&self) -> SnapshotError
fn clone(&self) -> SnapshotError
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 SnapshotError
impl Debug for SnapshotError
§impl Display for SnapshotError
impl Display for SnapshotError
§impl Error for SnapshotError
impl Error for SnapshotError
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<SnapshotError> for BookPnlError
impl From<SnapshotError> for BookPnlError
§fn from(e: SnapshotError) -> Self
fn from(e: SnapshotError) -> Self
Converts to this type from the input type.
§impl From<SourceError> for SnapshotError
impl From<SourceError> for SnapshotError
§fn from(e: SourceError) -> Self
fn from(e: SourceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SnapshotError
impl RefUnwindSafe for SnapshotError
impl Send for SnapshotError
impl Sync for SnapshotError
impl Unpin for SnapshotError
impl UnsafeUnpin for SnapshotError
impl UnwindSafe for SnapshotError
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