4 ms·
I would indeed expect something more robust like a security state machine where not all states can transition to any other state freely. The UI shouldn't even h
by oneplane 4y ago
I would indeed expect something more robust like a security state machine where not all states can transition to any other state freely. The UI shouldn't even have a say in what transitions are allowed.
- nerpderp82 4y agoThe other nice quality if your code is in a state machine is that it can verified by a model checker. You might like this post on statig, an HSM library for Rust https://old.reddit.com/r/rust/comments/yqp2cq/announcing_statig_hierarchical_state_machines_for/ https://old.reddit.com/r/rust/comments/yqp2cq/announcing_sta...
- doorman2 4y agoThe Rx model works nicely. Rather than trying to model state transitions, you model "scopes of work." So if you have something like an event listener, you would tie it to the active unlock session. When that session ends, you dispose of that "scope of work" and all work associated with it would immediately stop.