Trait TestStream

Source
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§

Source

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

Source

fn get_port(&self) -> Result<u16, Box<dyn Error + Send + Sync>>

return the port associated with the test-stream; this may vary over the test’s lifetime

Source

fn get_idx(&self) -> u8

returns the index of the test, used to match client and server data

Source

fn stop(&mut self)

stops a running test

Implementors§