Trait netsim::node::ether::EtherNode [−][src]
pub trait EtherNode: Sized { type Output: Send + 'static; fn build(
self,
handle: &NetworkHandle,
ipv4_range: Option<Ipv4Range>,
ipv6_range: Option<Ipv6Range>
) -> (SpawnComplete<Self::Output>, EtherPlug); }
An EtherNode
describes a recipe for constructing a network when given the IP ranges that the network
should operate on.
Associated Types
Required Methods
fn build(
self,
handle: &NetworkHandle,
ipv4_range: Option<Ipv4Range>,
ipv6_range: Option<Ipv6Range>
) -> (SpawnComplete<Self::Output>, EtherPlug)
self,
handle: &NetworkHandle,
ipv4_range: Option<Ipv4Range>,
ipv6_range: Option<Ipv6Range>
) -> (SpawnComplete<Self::Output>, EtherPlug)
Consume the EtherNode
and build the network it describes. Returns a SpawnComplete
that can
be used to join the spawned thread and an EtherPlug
that can be used to read-write frames to
the head node of the network.