[−][src]Struct rtnetlink::LinkSetRequest
Implementations
impl LinkSetRequest
[src]
pub async fn execute(self) -> Result<(), Error>
[src]
Execute the request
pub fn message_mut(&mut self) -> &mut LinkMessage
[src]
Return a mutable reference to the request
pub fn master(mut self: Self, master_index: u32) -> Self
[src]
Attach the link to a bridge (its master). This is equivalent to ip link set LINK master BRIDGE
. To succeed, both the bridge and the link that is being attached must be UP.
To Remove a link from a bridge, set its master to zero.
This is equvalent to ip link set LINK nomaster
pub fn nomaster(mut self: Self) -> Self
[src]
Detach the link from its master. This is equivalent to ip link set LINK nomaster
.
To succeed, the link that is being detached must be UP.
pub fn up(mut self: Self) -> Self
[src]
Set the link with the given index up (equivalent to ip link set dev DEV up
)
pub fn down(mut self: Self) -> Self
[src]
Set the link with the given index down (equivalent to ip link set dev DEV down
)
pub fn promiscuous(mut self: Self, enable: bool) -> Self
[src]
Enable or disable promiscious mode of the link with the given index (equivalent to ip link set dev DEV promisc on/off
)
pub fn arp(mut self: Self, enable: bool) -> Self
[src]
Enable or disable the ARP protocol of the link with the given index (equivalent to ip link set dev DEV arp on/off
)
pub fn name(mut self: Self, name: String) -> Self
[src]
Set the name of the link with the given index (equivalent to ip link set DEV name NAME
)
pub fn mtu(mut self: Self, mtu: u32) -> Self
[src]
Set the mtu of the link with the given index (equivalent to ip link set DEV mtu MTU
)
pub fn address(mut self: Self, address: Vec<u8>) -> Self
[src]
Set the hardware address of the link with the given index (equivalent to ip link set DEV address ADDRESS
)
pub fn setns_by_pid(mut self: Self, pid: u32) -> Self
[src]
Move this network device into the network namespace of the process with the given pid
.
pub fn setns_by_fd(mut self: Self, fd: RawFd) -> Self
[src]
Move this network device into the network namespace corresponding to the given file descriptor.
Auto Trait Implementations
impl !RefUnwindSafe for LinkSetRequest
[src]
impl Send for LinkSetRequest
[src]
impl Sync for LinkSetRequest
[src]
impl Unpin for LinkSetRequest
[src]
impl !UnwindSafe for LinkSetRequest
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,