pub enum Step {
Scan {
device: DeviceId,
code: String,
terminator: Option<Terminator>,
delay_ms: Option<u64>,
},
Tap {
device: DeviceId,
uid: String,
records: Option<Vec<NdefRecord>>,
},
Wait {
ms: u64,
},
SetFault {
device: DeviceId,
fault: FaultId,
options: FaultOptions,
},
ClearFault {
device: DeviceId,
fault: FaultId,
},
Expect {
device: DeviceId,
state: Option<Value>,
receipt_contains: Option<String>,
jobs: Option<u32>,
within_ms: Option<u64>,
},
}Expand description
One scenario step.
Variants§
Scan
Scan a barcode on a keyboard-wedge scanner.
Fields
§
terminator: Option<Terminator>Overrides the scanner’s terminator.
Tap
Tap an NFC card.
Fields
§
records: Option<Vec<NdefRecord>>NDEF records; without them the reader uses what it remembers of the card.
Wait
Wait.
SetFault
Turn a fault on.
ClearFault
Turn a fault off.
Expect
Check a device. Every given check must hold; with withinMs, they may become true
within that time (e.g. a receipt the app prints in response to a scan).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Step
impl<'de> Deserialize<'de> for Step
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Step
Auto Trait Implementations§
impl Freeze for Step
impl RefUnwindSafe for Step
impl Send for Step
impl Sync for Step
impl Unpin for Step
impl UnsafeUnpin for Step
impl UnwindSafe for Step
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