Struct tun::Configuration
[−]
[src]
pub struct Configuration { /* fields omitted */ }
Configuration builder for a TUN interface.
Methods
impl Configuration
[src]
fn platform<F>(&mut self, f: F) -> &mut Self where
F: FnOnce(&mut Configuration),
F: FnOnce(&mut Configuration),
Access the platform dependant configuration.
fn name<S: AsRef<str>>(&mut self, name: S) -> &mut Self
Set the name.
fn address<A: IntoAddress>(&mut self, value: A) -> &mut Self
Set the address.
fn destination<A: IntoAddress>(&mut self, value: A) -> &mut Self
Set the destination address.
fn broadcast<A: IntoAddress>(&mut self, value: A) -> &mut Self
Set the broadcast address.
fn netmask<A: IntoAddress>(&mut self, value: A) -> &mut Self
Set the netmask.
fn mtu(&mut self, value: i32) -> &mut Self
Set the MTU.
fn up(&mut self) -> &mut Self
Set the interface to be enabled once created.
fn down(&mut self) -> &mut Self
Set the interface to be disabled once created.
Trait Implementations
impl Clone for Configuration
[src]
fn clone(&self) -> Configuration
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Default for Configuration
[src]
fn default() -> Configuration
Returns the "default value" for a type. Read more