TrafficGeneration

Trait TrafficGeneration 

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

Source

fn build<T>( self, network_graph: T, ) -> impl Stream<Item = DestinationRouting> + Send
where T: NetworkGraphView + Send + Sync + '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.

Implementations on Foreign Types§

Source§

impl TrafficGeneration for ImmediateNeighborProber

Source§

fn build<U>( self, network_graph: U, ) -> impl Stream<Item = DestinationRouting> + Send
where U: NetworkGraphView + Send + Sync + 'static,

Implementors§