Enum sequent::SimulationError
source · pub enum SimulationError<S> {
TimelineExhausted,
Transition(TransitionError),
TruncationRequired(Box<dyn Event<State = S>>),
ReadScenario(ReadScenarioError),
WriteScenario(WriteScenarioError),
}
Expand description
Known errors that could be produced during the course of simulation, including the loading and saving of simulation scenarios.
Variants§
TimelineExhausted
Transition(TransitionError)
TruncationRequired(Box<dyn Event<State = S>>)
ReadScenario(ReadScenarioError)
WriteScenario(WriteScenarioError)
Implementations§
source§impl<S> SimulationError<S>
impl<S> SimulationError<S>
Conversions from the blanket SimulationError
type to the underlying variant arguments.
sourcepub fn is_timeline_exhausted(&self) -> bool
pub fn is_timeline_exhausted(&self) -> bool
Returns true
if and only if this is a SimulationError::TimelineExhausted
variant.
sourcepub fn transition(self) -> Option<TransitionError>
pub fn transition(self) -> Option<TransitionError>
Converts the error into a Option<TransitionError>
.
sourcepub fn truncation_required(self) -> Option<Box<dyn Event<State = S>>>
pub fn truncation_required(self) -> Option<Box<dyn Event<State = S>>>
Converts the error into a Option<TruncationRequired>
.
sourcepub fn read_scenario(self) -> Option<ReadScenarioError>
pub fn read_scenario(self) -> Option<ReadScenarioError>
Converts the error into a Option<ReadScenarioError>
.
sourcepub fn write_scenario(self) -> Option<WriteScenarioError>
pub fn write_scenario(self) -> Option<WriteScenarioError>
Converts the error into a Option<WriteScenarioError>
.
Trait Implementations§
source§impl<S: Debug> Debug for SimulationError<S>
impl<S: Debug> Debug for SimulationError<S>
source§impl<S> Display for SimulationError<S>
impl<S> Display for SimulationError<S>
source§impl<S> Error for SimulationError<S>where
Self: Debug + Display,
impl<S> Error for SimulationError<S>where
Self: Debug + Display,
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<S> From<ReadScenarioError> for SimulationError<S>
impl<S> From<ReadScenarioError> for SimulationError<S>
source§fn from(source: ReadScenarioError) -> Self
fn from(source: ReadScenarioError) -> Self
Converts to this type from the input type.
source§impl<S> From<TransitionError> for SimulationError<S>
impl<S> From<TransitionError> for SimulationError<S>
source§fn from(source: TransitionError) -> Self
fn from(source: TransitionError) -> Self
Converts to this type from the input type.
source§impl<S> From<WriteScenarioError> for SimulationError<S>
impl<S> From<WriteScenarioError> for SimulationError<S>
source§fn from(source: WriteScenarioError) -> Self
fn from(source: WriteScenarioError) -> Self
Converts to this type from the input type.