pub trait TrafficGeneration {
// Required method
fn build<T>(
self,
network_graph: T,
) -> impl Stream<Item = DestinationRouting> + Send
where T: NetworkGraphView + Send + Sync + '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§
fn build<T>( self, network_graph: T, ) -> impl Stream<Item = DestinationRouting> + Send
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.