pub enum SimulationError {
FatalError(String),
InvalidInput(String, Option<GetAmountOutResult>),
RecoverableError(String),
}Expand description
Represents the outer-level, user-facing errors of the tycho-simulation package.
SimulationError encompasses all possible errors that can occur in the package,
wrapping lower-level errors in a user-friendly way for easier handling and display.
Variants:
RecoverableError: Indicates that the simulation has failed with a recoverable error. Retrying at a later time may succeed. It may have failed due to a temporary issue, such as a network problem.InvalidInput: Indicates that the simulation has failed due to bad input parameters.FatalError: There is a bug with this pool or protocol - do not attempt simulation again.
Variants§
Trait Implementations§
Source§impl Debug for SimulationError
impl Debug for SimulationError
Source§impl Display for SimulationError
impl Display for SimulationError
Source§impl Error for SimulationError
impl Error for SimulationError
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()
Source§impl<T> From<SimulationError> for TransitionError<T>
impl<T> From<SimulationError> for TransitionError<T>
Source§fn from(error: SimulationError) -> Self
fn from(error: SimulationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SimulationError
impl !RefUnwindSafe for SimulationError
impl Send for SimulationError
impl Sync for SimulationError
impl Unpin for SimulationError
impl !UnwindSafe for SimulationError
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