pub struct UnifiEvent {
pub key: String,
pub subsystem: String,
pub site_id: String,
pub message: Option<String>,
pub datetime: Option<String>,
pub extra: Value,
}Expand description
A parsed event from the UniFi WebSocket stream.
Uses #[serde(flatten)] to capture all fields beyond the core set,
so nothing from the controller is silently dropped.
Fields§
§key: StringEvent key, e.g. "EVT_WU_Connected", "EVT_SW_Disconnected".
subsystem: StringSubsystem that emitted the event: "wlan", "lan", "sta", "gw", etc.
site_id: StringSite ID this event belongs to.
message: Option<String>Human-readable event message, if present.
datetime: Option<String>ISO-8601 timestamp from the controller.
extra: ValueAll remaining fields the controller sends.
Trait Implementations§
Source§impl Clone for UnifiEvent
impl Clone for UnifiEvent
Source§fn clone(&self) -> UnifiEvent
fn clone(&self) -> UnifiEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnifiEvent
impl Debug for UnifiEvent
Source§impl<'de> Deserialize<'de> for UnifiEvent
impl<'de> Deserialize<'de> for UnifiEvent
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
Source§impl From<UnifiEvent> for Event
impl From<UnifiEvent> for Event
Source§fn from(e: UnifiEvent) -> Self
fn from(e: UnifiEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnifiEvent
impl RefUnwindSafe for UnifiEvent
impl Send for UnifiEvent
impl Sync for UnifiEvent
impl Unpin for UnifiEvent
impl UnsafeUnpin for UnifiEvent
impl UnwindSafe for UnifiEvent
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