[][src]Struct tokio_tun::Tun

pub struct Tun { /* fields omitted */ }

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.

Trait Implementations

impl AsRawFd for Tun[src]

impl AsyncRead for Tun[src]

impl AsyncWrite for Tun[src]

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]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.