pub enum EventKind {
Show 15 variants
Created {
kind: String,
},
BytesIn {
data: Bytes,
},
BytesOut {
data: Bytes,
},
Control {
command: ControlCommand,
},
Fault {
fault_id: FaultId,
active: bool,
options: FaultOptions,
},
StateChanged {
state: Value,
},
Connected,
Disconnected,
JobCompleted {
job_id: JobId,
},
Log {
level: LogLevel,
message: String,
},
Reset,
Signals {
signals: SerialSignals,
},
Peripheral {
from: DeviceId,
to: DeviceId,
signal: PeripheralSignal,
},
Wedge {
scan: WedgeScan,
},
Nfc {
event: NfcEvent,
},
}Expand description
What happened, in an EventRecord.
Variants§
Created
The device was created.
BytesIn
Host -> device bytes.
BytesOut
Device -> host bytes.
Control
A control command was sent to the device.
Fields
§
command: ControlCommandThe command.
Fault
A fault was turned on or off.
Fields
§
options: FaultOptionsIts options.
StateChanged
The device state changed.
Connected
The device became reachable.
Disconnected
The device stopped being reachable.
JobCompleted
A print job closed.
Log
A device diagnostic.
Reset
The device was reset.
Signals
The app set serial output signals (DTR, RTS, break).
Fields
§
signals: SerialSignalsThe signals that were set.
Peripheral
A peripheral signal between attached devices, recorded in both devices’ logs.
Fields
§
signal: PeripheralSignalThe signal.
Wedge
A keyboard-wedge scanner typed a scan into the page.
Nfc
An NFC reader read a card, failed to, or answered a write from the app.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventKind
impl<'de> Deserialize<'de> for EventKind
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 EventKind
Auto Trait Implementations§
impl !Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnsafeUnpin for EventKind
impl UnwindSafe for EventKind
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