pub struct TestSubscriberProbe<T> { /* private fields */ }Implementations§
Source§impl<T> TestSubscriberProbe<T>
impl<T> TestSubscriberProbe<T>
pub fn set_timeout(&mut self, timeout: Duration)
pub fn request(&self, n: usize)
pub fn expect_next(&self) -> T
pub fn assert_next(&self, expected: T)
pub fn expect_next_n(&self, n: usize) -> Vec<T>
pub fn assert_next_n<I>(&self, expected: I)
Sourcepub fn expect_complete(&self)
pub fn expect_complete(&self)
Expects stream completion after a downstream pull has been issued.
Datum’s probes observe terminal signals through the normal pull loop, so
completion is not surfaced until a credit is outstanding. For empty
sources, call request(1) before expect_complete().
Sourcepub fn expect_error(&self) -> StreamError
pub fn expect_error(&self) -> StreamError
Expects a stream error after a downstream pull has been issued.
Datum’s probes observe terminal signals through the normal pull loop, so
an immediately failed source still requires request(1) before
expect_error().
pub fn expect_no_message(&self, timeout: Duration)
Sourcepub fn drain_until_complete(&self) -> Vec<T>
pub fn drain_until_complete(&self) -> Vec<T>
Drains all remaining queued events until stream completion, returning every collected value. Uses the probe’s configured timeout for each event wait. Panics if the stream fails instead of completing.
This is load-robust: it drains every Next event before expecting
Complete, so it tolerates operators that may emit extra elements
under thread contention without the test needing to know the exact
count ahead of time.