Skip to content

Commit

Permalink
Document the NetworkChange enum
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Apr 26, 2024
1 parent 02bdac2 commit a345468
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rust/agama-server/src/network/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

0 comments on commit a345468

Please sign in to comment.