pub struct LinkHsr;Expand description
Represent HSR (High-availability Seamless Redundancy) interface.
Example code on creating a HSR interface
use rtnetlink::{new_connection, LinkHsr};
#[tokio::main]
async fn main() -> Result<(), String> {
let (connection, handle, _) = new_connection().unwrap();
tokio::spawn(connection);
handle
.link()
.add(
LinkHsr::new("hsr0")
.port1(3)
.port2(4)
.build()
)
.execute()
.await
.map_err(|e| format!("{e}"))
}Please check LinkMessageBuilder::
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkHsr
impl RefUnwindSafe for LinkHsr
impl Send for LinkHsr
impl Sync for LinkHsr
impl Unpin for LinkHsr
impl UnsafeUnpin for LinkHsr
impl UnwindSafe for LinkHsr
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