Struct cargo_fixture::TestClient
source · pub struct TestClient { /* private fields */ }
Expand description
An RPC client used from test code.
An instance is created using TestClient::connect()
,
it’s more convenient to use the with_fixture
macro.
Implementations§
source§impl TestClient
impl TestClient
sourcepub async fn connect(serial: bool) -> Result<Self>
pub async fn connect(serial: bool) -> Result<Self>
Connect to running cargo fixture
process.
The serial
argument is a way to create a serial test. When set to true
,
cargo fixture
will make sure that no other test client is connected at the same time.
That is, if any other tests are already running, it will wait for them to finish,
then let this connection proceed, and only let other connections in once this one is finished.
Auto Trait Implementations§
impl !Freeze for TestClient
impl RefUnwindSafe for TestClient
impl Send for TestClient
impl Sync for TestClient
impl Unpin for TestClient
impl UnwindSafe for TestClient
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