pub struct Device { /* private fields */ }
Expand description
A TUN device using the TUN/TAP Linux driver.
Implementations§
source§impl Device
impl Device
Trait Implementations§
source§impl AbstractDevice for Device
impl AbstractDevice for Device
source§fn destination(&self) -> Result<IpAddr>
fn destination(&self) -> Result<IpAddr>
Get the destination address.
source§fn set_broadcast<A: IntoAddress>(&self, value: A) -> Result<()>
fn set_broadcast<A: IntoAddress>(&self, value: A) -> Result<()>
Set the broadcast address.
source§fn set_network_address<A: IntoAddress>(
&self,
address: A,
netmask: A,
destination: Option<A>,
) -> Result<()>
fn set_network_address<A: IntoAddress>( &self, address: A, netmask: A, destination: Option<A>, ) -> Result<()>
Sets the network addresses of this adapter, including network address, subnet mask, and gateway
Auto Trait Implementations§
impl !Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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