pub enum StateMachineBuildError<S, E> {
InitialStateNotRegistered {
state: S,
},
FinalStateNotRegistered {
state: S,
},
TransitionSourceNotRegistered {
source: S,
event: E,
target: S,
},
TransitionTargetNotRegistered {
source: S,
event: E,
target: S,
},
DuplicateTransition {
source: S,
event: E,
existing_target: S,
new_target: S,
},
}Expand description
Error returned when state machine rules are internally inconsistent.
S is the state type and E is the event type.
Variants§
InitialStateNotRegistered
An initial state was configured but not registered as a state.
Fields
§
state: SThe unregistered initial state.
FinalStateNotRegistered
A final state was configured but not registered as a state.
Fields
§
state: SThe unregistered final state.
TransitionSourceNotRegistered
A transition source was not registered as a state.
Fields
§
source: SSource state of the invalid transition.
§
event: EEvent of the invalid transition.
§
target: STarget state of the invalid transition.
TransitionTargetNotRegistered
A transition target was not registered as a state.
Fields
§
source: SSource state of the invalid transition.
§
event: EEvent of the invalid transition.
§
target: STarget state of the invalid transition.
DuplicateTransition
Two transitions use the same (source, event) with different targets.
Trait Implementations§
Source§impl<S: Clone, E: Clone> Clone for StateMachineBuildError<S, E>
impl<S: Clone, E: Clone> Clone for StateMachineBuildError<S, E>
Source§fn clone(&self) -> StateMachineBuildError<S, E>
fn clone(&self) -> StateMachineBuildError<S, E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S, E> Display for StateMachineBuildError<S, E>
impl<S, E> Display for StateMachineBuildError<S, E>
Source§impl<S, E> Error for StateMachineBuildError<S, E>
impl<S, E> Error for StateMachineBuildError<S, E>
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<S: PartialEq, E: PartialEq> PartialEq for StateMachineBuildError<S, E>
impl<S: PartialEq, E: PartialEq> PartialEq for StateMachineBuildError<S, E>
Source§fn eq(&self, other: &StateMachineBuildError<S, E>) -> bool
fn eq(&self, other: &StateMachineBuildError<S, E>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<S: Copy, E: Copy> Copy for StateMachineBuildError<S, E>
impl<S: Eq, E: Eq> Eq for StateMachineBuildError<S, E>
impl<S, E> StructuralPartialEq for StateMachineBuildError<S, E>
Auto Trait Implementations§
impl<S, E> Freeze for StateMachineBuildError<S, E>
impl<S, E> RefUnwindSafe for StateMachineBuildError<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for StateMachineBuildError<S, E>
impl<S, E> Sync for StateMachineBuildError<S, E>
impl<S, E> Unpin for StateMachineBuildError<S, E>
impl<S, E> UnsafeUnpin for StateMachineBuildError<S, E>where
S: UnsafeUnpin,
E: UnsafeUnpin,
impl<S, E> UnwindSafe for StateMachineBuildError<S, E>where
S: UnwindSafe,
E: UnwindSafe,
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