Expand description
A mock type implementing AsyncRead
and AsyncWrite
.
(fork of tokio_test::io
§Overview
Provides a type that implements AsyncRead
+ AsyncWrite
that can be configured
to handle an arbitrary sequence of read and write operations. This is useful
for writing unit tests for networking services as using an actual network
type is fairly non deterministic.
§Usage
Attempting to write data that the mock isn’t expecting will result in a panic.
Structs§
- Builder
- Builds
Mock
instances. - Handle
- A handle to send additional actions to the related
Mock
. - Mock
- An I/O object that follows a predefined script.
- Mock
Outcome panicless-mode
- Final report of a a mock when used in panicless mode
- Parse
Error text-scenarios
Enums§
- Mock
Outcome Error panicless-mode
- Details of an error detected by mock when in panicless mode.