pub struct NetworkInformation {
pub name: String,
pub addresses: HashSet<IpAddr>,
pub wifi_mac: Option<[u8; 6]>,
pub ethernet_mac: Option<[u8; 6]>,
pub port: u16,
pub properties: HashMap<String, String>,
pub last_reachable_address: String,
}Expand description
Network information for a tosca device.
It contains all the necessary data to contact a tosca device within
a network.
Fields§
§name: StringFull device name.
addresses: HashSet<IpAddr>Device IP addresses.
wifi_mac: Option<[u8; 6]>Device Wi-Fi MAC address.
If None, the Wi-Fi MAC address is not present.
ethernet_mac: Option<[u8; 6]>Device Ethernet MAC address.
If None, the Ethernet MAC address is not present.
port: u16The port on which the device is listening.
properties: HashMap<String, String>Device properties.
last_reachable_address: StringDevice last reachable address.
Prevents regenerating the full device address every time.
Implementations§
Source§impl NetworkInformation
impl NetworkInformation
Trait Implementations§
Source§impl Clone for NetworkInformation
impl Clone for NetworkInformation
Source§fn clone(&self) -> NetworkInformation
fn clone(&self) -> NetworkInformation
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 NetworkInformation
impl Debug for NetworkInformation
Source§impl PartialEq for NetworkInformation
impl PartialEq for NetworkInformation
Source§impl Serialize for NetworkInformation
impl Serialize for NetworkInformation
impl StructuralPartialEq for NetworkInformation
Auto Trait Implementations§
impl Freeze for NetworkInformation
impl RefUnwindSafe for NetworkInformation
impl Send for NetworkInformation
impl Sync for NetworkInformation
impl Unpin for NetworkInformation
impl UnwindSafe for NetworkInformation
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