pub struct InterfaceConfig {
pub name: String,
pub match_by: InterfaceMatcher,
pub static_ip: Option<StaticIpConfig>,
pub dhcp: bool,
pub metric: u32,
pub dns_servers: Vec<Ipv4Addr>,
}Expand description
Per-interface network configuration.
Fields§
§name: StringPublic interface name, for example eth0.
match_by: InterfaceMatcherRule used to bind this config to one probed device.
static_ip: Option<StaticIpConfig>Static IPv4 configuration. Mutually exclusive with DHCP.
dhcp: boolWhether DHCP client configuration is enabled.
metric: u32Route metric used for routes installed from this interface.
dns_servers: Vec<Ipv4Addr>Static DNS servers associated with this interface.
Trait Implementations§
Source§impl Clone for InterfaceConfig
impl Clone for InterfaceConfig
Source§fn clone(&self) -> InterfaceConfig
fn clone(&self) -> InterfaceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InterfaceConfig
impl RefUnwindSafe for InterfaceConfig
impl Send for InterfaceConfig
impl Sync for InterfaceConfig
impl Unpin for InterfaceConfig
impl UnsafeUnpin for InterfaceConfig
impl UnwindSafe for InterfaceConfig
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