Trait sfsm::TryErrorState
source · [−]pub trait TryErrorState: TryState {
fn consume_error(&mut self, err: Self::Error);
}
Expand description
This trait must be implemented by the error state.
The error is being injected into the error state after it has been generated and the
consume_error
function allows to specify how the incoming error should be handled.
Required Methods
fn consume_error(&mut self, err: Self::Error)
fn consume_error(&mut self, err: Self::Error)
Handle the incoming error
fn consume_error(&mut self, err: Self::Error) {
// Store it into the error trait or it
println!("Received an error: {:?}", err);
}