Struct ipconfig::Adapter

source ·
pub struct Adapter { /* private fields */ }
Expand description

Represent an adapter.

Implementations

Get the adapter’s name

Get the adapter’s ip addresses (unicast ip addresses)

Get the adapter’s prefixes. Returns a list of tuples (IpAddr, u32), where first element is a subnet address, e.g. 192.168.1.0 and second element is prefix length, e.g. 24

Get the adapter’s gateways

Get the adapter’s dns servers (the preferred dns server is first)

Get the adapter’s description

Get the adapter’s friendly name

Get the adapter’s physical (MAC) address

Get the adapter Recieve Link Speed (bits per second)

Get the Trasnmit Link Speed (bits per second)

Check if the adapter is up (OperStatus is IfOperStatusUp)

Get the interface type

Get the IPv6 interface index.

The return value can be used as an IPv6 scope id for link-local addresses.

Returns the metric used to compute route preference for IPv4

Returns the metric used to compute route preference for IPv6

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.