Enum sfsm_base::fallible::ExtendedSfsmError [−][src]
#[non_exhaustive]
pub enum ExtendedSfsmError<T> {
Internal,
Custom(T),
}Expand description
An error type that will be returned by the state machine if something goes wrong.
It fulfills the same purpose that the ordinary SfsmError does, but allows the
user to extend it with custom error types that are required by the fallible state machine.
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.
Returned if the state machine gets stuck due to an internal error or if the state machine has not been started before stepping.
The custom error can be returned from the error state if an error cannot be handled. In that case, the state machine bubbles the error up to the calling start or step function where it then must be handled by the user.