Struct netsim_embed::Netsim [−][src]
pub struct Netsim<C, E> { /* fields omitted */ }Implementations
impl<C, E> Netsim<C, E> where
C: Display + Send + 'static,
E: FromStr + Send + 'static,
E::Err: Debug + Display + Send + Sync, [src]
impl<C, E> Netsim<C, E> where
C: Display + Send + 'static,
E: FromStr + Send + 'static,
E::Err: Debug + Display + Send + Sync, [src]pub fn new() -> Self[src]
pub fn machine(&mut self, id: MachineId) -> &mut Machine<C, E>[src]
pub fn machines(&self) -> &[Machine<C, E>][src]
pub fn machines_mut(&mut self) -> &mut [Machine<C, E>][src]
pub async fn spawn_machine(
&mut self,
command: Command,
delay: Option<DelayBuffer>
) -> MachineId[src]
&mut self,
command: Command,
delay: Option<DelayBuffer>
) -> MachineId
pub fn network(&self, id: NetworkId) -> &Network[src]
pub fn spawn_network(&mut self, range: Ipv4Range) -> NetworkId[src]
pub async fn plug(
&mut self,
machine: MachineId,
net: NetworkId,
addr: Option<Ipv4Addr>
)[src]
&mut self,
machine: MachineId,
net: NetworkId,
addr: Option<Ipv4Addr>
)
pub async fn unplug(&mut self, machine: MachineId)[src]
pub fn add_route(&mut self, net_a: NetworkId, net_b: NetworkId)[src]
pub fn add_nat_route(
&mut self,
config: NatConfig,
public_net: NetworkId,
private_net: NetworkId
)[src]
&mut self,
config: NatConfig,
public_net: NetworkId,
private_net: NetworkId
)
Trait Implementations
Auto Trait Implementations
impl<C, E> !RefUnwindSafe for Netsim<C, E>
impl<C, E> Send for Netsim<C, E> where
C: Send,
E: Send,
C: Send,
E: Send,
impl<C, E> Sync for Netsim<C, E> where
C: Send,
E: Send,
C: Send,
E: Send,
impl<C, E> Unpin for Netsim<C, E>
impl<C, E> !UnwindSafe for Netsim<C, E>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,