Expand description
Tokio and Futures based testing utilities
Modules§
- io
- A mock type implementing
AsyncRead
andAsyncWrite
. - stream_
mock - A mock stream implementing
Stream
. - task
- Futures task based helpers to easily test futures and manually written futures.
Macros§
- assert_
elapsed - Asserts that an exact duration has elapsed since the start instant ±1ms.
- assert_
err - Asserts that the expression evaluates to
Err
and returns the error. - assert_
ok - Asserts that the expression evaluates to
Ok
and returns the value. - assert_
pending - Asserts a
Poll
is pending. - assert_
ready - Asserts a
Poll
is ready, returning the value. - assert_
ready_ eq - Asserts if a poll is ready and check for equality on the value
- assert_
ready_ err - Asserts a
Poll<Result<...>>
is ready andErr
, returning the error. - assert_
ready_ ok - Asserts a
Poll<Result<...>>
is ready andOk
, returning the value.
Functions§
- block_
on - Runs the provided future, blocking the current thread until the future completes.