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