|
|
|
|
|
by 10000truths
124 days ago
|
|
> I would highlight that there are many cases where you CAN move an object safely until a certain operation requires the object to "stay put" in place. You could model this with a state machine enum where the "stay put" phase is a variant that accepts a !Move, like so: enum StateMachine<PinnedState: ?Move> {
InitialState,
State1(String),
State2(Box<PinnedState>),
TerminalState,
}
|
|