Struct netsim_embed::Netsim
source · pub struct Netsim<C, E> { /* private fields */ }
Implementations§
source§impl<C, E> Netsim<C, E>
impl<C, E> Netsim<C, E>
pub fn new() -> Self
pub fn machine(&mut self, id: MachineId) -> &mut Machine<C, E>
pub fn machines(&self) -> &[Machine<C, E>]
pub fn machines_mut(&mut self) -> &mut [Machine<C, E>]
pub async fn spawn_machine( &mut self, command: Command, delay: Option<DelayBuffer> ) -> MachineId
pub fn network(&self, id: NetworkId) -> &Network
pub fn network_mut(&mut self, id: NetworkId) -> &mut Network
pub fn spawn_network(&mut self, range: Ipv4Range) -> NetworkId
pub async fn plug( &mut self, machine: MachineId, net: NetworkId, addr: Option<Ipv4Addr> )
pub async fn unplug(&mut self, machine: MachineId)
pub fn add_route(&mut self, net_a: NetworkId, net_b: NetworkId)
pub fn enable_route(&mut self, net_a: NetworkId, net_b: NetworkId)
pub fn disable_route(&mut self, net_a: NetworkId, net_b: NetworkId)
pub fn add_nat_route( &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>
impl<C, E> Sync for Netsim<C, E>
impl<C, E> Unpin for Netsim<C, E>where
E: Unpin,
impl<C, E> !UnwindSafe for Netsim<C, E>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more