pub enum GraphError {
Render(String),
Io(Error),
Curve(CurveError),
Surface(SurfaceError),
Decimal(Box<DecimalError>),
Backtest(Box<BacktestError>),
}Expand description
Represents errors that can occur during graph generation and rendering operations.
This error type encapsulates failures that may happen when creating, rendering, or saving graphical representations of financial data such as option chains, volatility surfaces, or strategy payoffs.
Variants§
Render(String)
Represents errors that occur during the rendering process. Contains a descriptive message about what went wrong.
Io(Error)
Represents I/O errors that occur when reading from or writing to files (e.g., when saving graphs to disk).
Curve(CurveError)
Error from curve operations.
Surface(SurfaceError)
Error from surface operations.
Decimal(Box<DecimalError>)
A figure a report derives for display (a total, an average) left the
representable Decimal range.
Backtest(Box<BacktestError>)
The backtest figures a report shows could not be computed, for
example when the statistics of a SimulationStats accumulator
overflow Decimal.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BacktestError> for GraphError
impl From<BacktestError> for GraphError
Source§fn from(err: BacktestError) -> Self
fn from(err: BacktestError) -> Self
Source§impl From<CurveError> for GraphError
impl From<CurveError> for GraphError
Source§fn from(err: CurveError) -> Self
fn from(err: CurveError) -> Self
Source§impl From<DecimalError> for GraphError
impl From<DecimalError> for GraphError
Source§fn from(err: DecimalError) -> Self
fn from(err: DecimalError) -> Self
Source§impl From<Error> for GraphError
impl From<Error> for GraphError
Source§impl From<SurfaceError> for GraphError
impl From<SurfaceError> for GraphError
Source§fn from(err: SurfaceError) -> Self
fn from(err: SurfaceError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for GraphError
impl !UnwindSafe for GraphError
impl Freeze for GraphError
impl Send for GraphError
impl Sync for GraphError
impl Unpin for GraphError
impl UnsafeUnpin for GraphError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.