Trait NetworkConfigLoader

Source
pub trait NetworkConfigLoader {
    // Required methods
    fn new(path: &'static str) -> Self;
    fn is_dhcp(&self) -> bool;
    fn ip_address(&self) -> Option<IPv4Network>;
    fn gateway(&self) -> Option<Ipv4Addr>;
    fn get_settings_section(&self) -> Option<String>;
    fn dns(&self) -> Vec<Ipv4Addr>;
    fn enable_dhcp(&self) -> Result<(), Error>;
    fn static_ip(
        &self,
        address: &str,
        gateway: &str,
    ) -> Result<(), StaticIPError>;
}

Required Methods§

Source

fn new(path: &'static str) -> Self

Source

fn is_dhcp(&self) -> bool

Source

fn ip_address(&self) -> Option<IPv4Network>

Source

fn gateway(&self) -> Option<Ipv4Addr>

Source

fn get_settings_section(&self) -> Option<String>

Source

fn dns(&self) -> Vec<Ipv4Addr>

Source

fn enable_dhcp(&self) -> Result<(), Error>

Source

fn static_ip(&self, address: &str, gateway: &str) -> Result<(), StaticIPError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§