Struct netsim::iface::EtherIfaceBuilder [] [src]

pub struct EtherIfaceBuilder { /* fields omitted */ }

This object can be used to set the configuration options for a EtherIface before creating the EtherIface using build.

Methods

impl EtherIfaceBuilder
[src]

[src]

Start building a new EtherIface with the default configuration options.

[src]

Set the interface name.

[src]

Set the interface address.

[src]

Set the interface netmask.

[src]

Add a route to the set of routes that will be created and directed through this interface.

[src]

Consume this EtherIfaceBuilder and build a UnboundEtherIface. This creates the TAP device but does not bind it to a tokio event loop. This is useful if the event loop lives in a different thread to where you need to create the device. You can send a UnboundEtherIface to another thread then bind it to create your EtherIface.

[src]

Consume this EtherIfaceBuilder and build the TAP interface. The returned EtherIface object can be used to read/write ethernet frames from this interface. handle is a handle to a tokio event loop which will be used for reading/writing.

Trait Implementations

impl Debug for EtherIfaceBuilder
[src]

[src]

Formats the value using the given formatter.

impl Default for EtherIfaceBuilder
[src]

[src]

Returns the "default value" for a type. Read more