pub struct NetworkAdapterInfo { /* private fields */ }Expand description
Represents information about a network adapter.
Implementations§
Source§impl NetworkAdapterInfo
impl NetworkAdapterInfo
Sourcepub fn new(
name: String,
handle: HANDLE,
medium: u32,
hw_address: [u8; 6],
mtu: u16,
) -> Self
pub fn new( name: String, handle: HANDLE, medium: u32, hw_address: [u8; 6], mtu: u16, ) -> Self
Creates a new NetworkAdapterInfo object with the specified properties.
§Arguments
name: AStringrepresenting the name of the network adapter.handle: AHANDLEto the network adapter.medium: Au32value representing the network adapter medium.hw_address: A[u8; 6]array representing the hardware address of the network adapter.mtu: Au16value representing the maximum transmission unit (MTU) of the network adapter.
§Returns
NetworkAdapterInfo- A new instance ofNetworkAdapterInfo.
Sourcepub fn get_name(&self) -> &str
pub fn get_name(&self) -> &str
Returns the name of the network adapter.
§Returns
&str- A reference to the name of the network adapter.
Sourcepub fn get_handle(&self) -> HANDLE
pub fn get_handle(&self) -> HANDLE
Sourcepub fn get_medium(&self) -> u32
pub fn get_medium(&self) -> u32
Sourcepub fn get_hw_address(&self) -> &[u8; 6]
pub fn get_hw_address(&self) -> &[u8; 6]
Returns the hardware address of the network adapter.
§Returns
&[u8; 6]- A reference to the hardware address of the network adapter.