pub struct Sim { /* private fields */ }Expand description
A running sim. It stops when dropped.
Implementations§
Source§impl Sim
impl Sim
Sourcepub async fn start() -> Self
pub async fn start() -> Self
Starts a sim on a free port of 127.0.0.1, on the current Tokio runtime.
§Panics
If no loopback port can be bound.
Sourcepub async fn start_on(port: u16) -> Result<Self>
pub async fn start_on(port: u16) -> Result<Self>
Starts a sim on this port of 127.0.0.1 (0 for a free one), on the current Tokio runtime.
pub fn inject(&self, injection: Injection)
Trait Implementations§
Auto Trait Implementations§
impl Forget for Sim
impl Freeze for Sim
impl Move for Sim
impl RefUnwindSafe for Sim
impl Send for Sim
impl Sync for Sim
impl Unpin for Sim
impl UnsafeUnpin for Sim
impl UnwindSafe for Sim
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