pub trait TestStream {
// Required methods
fn run_interval(
&mut self,
) -> Option<Result<Box<dyn IntervalResult + Sync + Send>, Box<dyn Error + Send + Sync>>>;
fn get_port(&self) -> Result<u16, Box<dyn Error + Send + Sync>>;
fn get_idx(&self) -> u8;
fn stop(&mut self);
}
Expand description
tests in this system are self-contained iterator-likes, where run_interval() may be invoked multiple times until it returns None, indicating that the test has run its course; each invocation blocks for up to approximately INTERVAL while gathering data.
Required Methods§
Sourcefn run_interval(
&mut self,
) -> Option<Result<Box<dyn IntervalResult + Sync + Send>, Box<dyn Error + Send + Sync>>>
fn run_interval( &mut self, ) -> Option<Result<Box<dyn IntervalResult + Sync + Send>, Box<dyn Error + Send + Sync>>>
gather data; returns None when the test is over