Struct rtnetlink::AddressHandle
source · pub struct AddressHandle(/* private fields */);
Implementations§
source§impl AddressHandle
impl AddressHandle
pub fn new(handle: Handle) -> Self
sourcepub fn get(&self) -> AddressGetRequest
pub fn get(&self) -> AddressGetRequest
Retrieve the list of ip addresses (equivalent to ip addr show
)
sourcepub fn add(
&self,
index: u32,
address: IpAddr,
prefix_len: u8,
) -> AddressAddRequest
pub fn add( &self, index: u32, address: IpAddr, prefix_len: u8, ) -> AddressAddRequest
Add an ip address on an interface (equivalent to ip addr add
)
sourcepub fn del(&self, address: AddressMessage) -> AddressDelRequest
pub fn del(&self, address: AddressMessage) -> AddressDelRequest
Delete the given address
Auto Trait Implementations§
impl Freeze for AddressHandle
impl !RefUnwindSafe for AddressHandle
impl Send for AddressHandle
impl Sync for AddressHandle
impl Unpin for AddressHandle
impl !UnwindSafe for AddressHandle
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