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