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