From a345468b294380a27d94d648e8a5dfa6be6b50b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Fri, 26 Apr 2024 15:34:52 +0100 Subject: [PATCH] Document the NetworkChange enum --- rust/agama-server/src/network/model.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rust/agama-server/src/network/model.rs b/rust/agama-server/src/network/model.rs index bbaacf55a..f30c9f76e 100644 --- a/rust/agama-server/src/network/model.rs +++ b/rust/agama-server/src/network/model.rs @@ -1305,10 +1305,16 @@ impl fmt::Display for InfinibandTransportMode { } } +/// Represents a network change. #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub enum NetworkChange { + /// A new device has been added. DeviceAdded(Device), + /// A device has been removed. DeviceRemoved(String), + /// The device has been updated. The String corresponds to the + /// original device name, which is especially useful if the + /// device gets renamed. DeviceUpdated(String, Device), }