[−][src]Struct async_tun::Tun
Represents a Tun/Tap device. Use TunBuilder
to create a new instance of Tun
.
Implementations
impl Tun
[src]
pub fn name(&self) -> &str
[src]
Returns the name of Tun/Tap device.
pub fn mtu(&self) -> Result<i32>
[src]
Returns the value of MTU.
pub fn address(&self) -> Result<Ipv4Addr>
[src]
Returns the IPv4 address of MTU.
pub fn destination(&self) -> Result<Ipv4Addr>
[src]
Returns the IPv4 destination address of MTU.
pub fn broadcast(&self) -> Result<Ipv4Addr>
[src]
Returns the IPv4 broadcast address of MTU.
pub fn netmask(&self) -> Result<Ipv4Addr>
[src]
Returns the IPv4 netmask address of MTU.
pub fn flags(&self) -> Result<i16>
[src]
Returns the flags of MTU.
pub fn split(&self) -> (BufReader<&File>, BufWriter<&File>)
[src]
Splits self to reader and writer pairs.
pub fn reader(&self) -> BufReader<&File>
[src]
Returns a reader to read from tun.
pub fn writer(&self) -> BufWriter<&File>
[src]
Returns a writer to write to tun.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Tun
impl Send for Tun
impl Sync for Tun
impl Unpin for Tun
impl !UnwindSafe for Tun
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,
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.
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>,