pub enum Event {
BootComplete,
PinVerified,
SessionEnded,
SignRequested,
TouchPressed,
TouchTimeout,
SignComplete,
ErrorRaised,
ErrorDisplayElapsed,
}Expand description
Events that drive transitions.
Events come from three sources: the dispatch loop (PIN verified, sign
requested), the touch sampler (touch pressed), and the timer task
(timeout elapsed). Each variant maps onto a single transition in
TokenState::on_event.
Variants§
BootComplete
Peripherals are ready, USB has enumerated.
PinVerified
A PIN session has just been opened.
SessionEnded
The PIN session timed out or was closed.
SignRequested
A Sign request just landed; user must touch.
TouchPressed
The touch button was pressed (debounced).
TouchTimeout
The touch-waiting period ran out without a press.
SignComplete
The signing operation finished (signature returned to host).
ErrorRaised
An error happened. Display the error pattern then return to idle.
ErrorDisplayElapsed
The error display window ran out.
Trait Implementations§
impl Copy for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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