TrafficGeneration

Trait TrafficGeneration 

Source
pub trait TrafficGeneration {
    // Required method
    fn build(
        self,
    ) -> (impl Stream<Item = DestinationRouting> + Send, impl Sink<Result<Telemetry, ProbeError>, Error = impl Error> + Send + Sync + Clone + 'static);
}
Expand description

A trait for types that can produce a stream of cover traffic routes.

The basic assumption is that the implementor will provide the logic to choose suitable route candidates for cover traffic based on a custom algorithm.

The implementor should ensure that the produced routes are indefinite, since the exhaustion of the stream might result in termination of the cover traffic generation.

Required Methods§

Source

fn build( self, ) -> (impl Stream<Item = DestinationRouting> + Send, impl Sink<Result<Telemetry, ProbeError>, Error = impl Error> + Send + Sync + Clone + 'static)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§