Skip to main content

primary

Function primary 

Source
pub fn primary() -> Result<Option<Interface>>
Expand description

The interface holding the default route; None without one.

if let Some(i) = sys_lib::net::primary()? {
    println!("{} {:?}", i.name, i.addresses);
}

ยงErrors

As interfaces.