pub enum DeviceEvent {
ToHost(Bytes),
StateChanged,
JobCompleted(Job),
Connected,
Disconnected,
Log(LogEntry),
Peripheral(PeripheralSignal),
Wedge(WedgeScan),
Nfc(NfcEvent),
}Expand description
Something a device did, returned from every Device call.
Variants§
ToHost(Bytes)
Device -> host bytes (status replies).
StateChanged
Device::state changed.
JobCompleted(Job)
A print job with its AST.
Connected
The device became reachable by the host.
Disconnected
The device stopped being reachable by the host.
Log(LogEntry)
A diagnostic message, e.g. an unknown command.
Peripheral(PeripheralSignal)
A signal to attached devices; the registry delivers it (see Device::attached_to).
Wedge(WedgeScan)
Keystrokes a keyboard-wedge scanner types into the page (PRD section 8.4). The transport hands them to the shim, which presses the keys like a keyboard driver.
Nfc(NfcEvent)
An NFC reader read a card, failed to read one, or answered a write from the app (PRD
section 8.3). The transport hands reads to the shim as reading / readingerror.
Trait Implementations§
Source§impl Clone for DeviceEvent
impl Clone for DeviceEvent
Source§impl Debug for DeviceEvent
impl Debug for DeviceEvent
Source§impl PartialEq for DeviceEvent
impl PartialEq for DeviceEvent
impl StructuralPartialEq for DeviceEvent
Auto Trait Implementations§
impl !Freeze for DeviceEvent
impl RefUnwindSafe for DeviceEvent
impl Send for DeviceEvent
impl Sync for DeviceEvent
impl Unpin for DeviceEvent
impl UnsafeUnpin for DeviceEvent
impl UnwindSafe for DeviceEvent
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