sos_core/events/
device.rs1use super::{EventKind, LogEvent};
3use crate::device::{DevicePublicKey, TrustedDevice};
4
5#[derive(Default, Debug, Clone, Eq, PartialEq)]
7pub enum DeviceEvent {
8 #[default]
9 #[doc(hidden)]
10 Noop,
11 Trust(TrustedDevice),
13 Revoke(DevicePublicKey),
18}
19
20impl LogEvent for DeviceEvent {
21 fn event_kind(&self) -> EventKind {
22 match self {
23 Self::Noop => EventKind::Noop,
24 Self::Trust(_) => EventKind::TrustDevice,
25 Self::Revoke(_) => EventKind::RevokeDevice,
26 }
27 }
28}