pub struct LinkBond;Expand description
Represent bond interface. Example code on creating a bond interface
use rtnetlink::{new_connection, LinkBond, packet_route::link::BondMode};
#[tokio::main]
async fn main() -> Result<(), String> {
let (connection, handle, _) = new_connection().map_err(|e|
format!("{e}"))?;
tokio::spawn(connection);
let message = LinkBond::new("bond0")
.mode(BondMode::ActiveBackup)
.miimon(100)
.updelay(100)
.downdelay(100)
.min_links(2)
.up()
.build();
handle
.link()
.add(message)
.execute()
.await
.map_err(|e| format!("{e}"))
}Please check LinkMessageBuilder::
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkBond
impl RefUnwindSafe for LinkBond
impl Send for LinkBond
impl Sync for LinkBond
impl Unpin for LinkBond
impl UnwindSafe for LinkBond
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