Struct ndisapi_rs::NetworkAdapterInfo
source · 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
: AString
representing the name of the network adapter.handle
: AHANDLE
to the network adapter.medium
: Au32
value representing the network adapter medium.hw_address
: A[u8; 6]
array representing the hardware address of the network adapter.mtu
: Au16
value 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.
Auto Trait Implementations§
impl RefUnwindSafe for NetworkAdapterInfo
impl Send for NetworkAdapterInfo
impl Sync for NetworkAdapterInfo
impl Unpin for NetworkAdapterInfo
impl UnwindSafe for NetworkAdapterInfo
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