pub struct Sim { /* private fields */ }Expand description
A running simulator. It stops when dropped.
Implementations§
Source§impl Sim
impl Sim
Sourcepub async fn start_with(fixture: Fixture, options: Options) -> Result<Self>
pub async fn start_with(fixture: Fixture, options: Options) -> Result<Self>
Sourcepub fn fingerprint(&self) -> Option<Fingerprint>
pub fn fingerprint(&self) -> Option<Fingerprint>
The fingerprint of the certificate, if the simulator serves HTTPS.
Sourcepub fn client(&self) -> ClientBuilder
pub fn client(&self) -> ClientBuilder
A client builder for the simulator, with its credentials and, for HTTPS, its certificate pinned.
Sourcepub fn inject(&self, injection: Injection)
pub fn inject(&self, injection: Injection)
Changes how the simulator behaves from the next request on.
Sourcepub fn clear_injections(&self)
pub fn clear_injections(&self)
Removes all injections.
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