pub fn add_exchange<I, SndOp, O, RcvOp>(
        &self,
        sender: SndOp,
        receiver: RcvOp,
        input_stream: &Stream<Self, I>,
    ) -> Stream<Self, O>
    where
        I: Data,
        O: Data,
        SndOp: SinkOperator<I>,
        RcvOp: SourceOperator<O>,
    {
        let preference = sender.input_preference();
        self.add_exchange_with_preference(sender, receiver, input_stream, preference)
    }
/// Add a pair of operators that implement cross-worker communication.
///
/// Operators that exchange data across workers are split into two
/// operators: the **sender** responsible for partitioning values read
/// from the input stream and distributing them across workers and the
/// **receiver**, which receives and reassembles data received from its
/// peers.  Splitting communication into two halves allows the scheduler
/// to schedule useful work in between them instead of blocking to wait
/// for the receiver.
///
/// Exchange operators use some form of IPC or shared memory instead of
/// streams to communicate.  Therefore, the sender must implement trait
/// [`SinkOperator`], while the receiver implements [`SourceOperator`].
///
/// This function adds both operators to the circuit and registers a
/// dependency between them, making sure that the scheduler will
/// evaluate the sender before the receiver even though there is no
/// explicit stream connecting them.
///
/// Returns the output stream produced by the receiver operator.
///
/// # Arguments
///
/// * `sender` - the sender half of the pair.  The sender must be a sink
///   operator
/// * `receiver` - the receiver half of the pair.  Must be a source
/// * `input_stream` - stream to connect as input to the `sender`.
Add a pair of operators that implement cross-worker communication.

Exchange operators use some form of IPC or shared memory instead of
streams to communicate.  Therefore, the sender must implement trait
[`SinkOperator`], while the receiver implements [`SourceOperator`].

This function adds both operators to the circuit and registers a
dependency between them, making sure that the scheduler will
evaluate the sender before the receiver even though there is no
explicit stream connecting them.

Returns the output stream produced by the receiver operator.
Add a pair of operators that implement cross - worker communication . Exchange operators use some form of IPC or shared memory instead of streams to communicate . Therefore the sender must implement trait [ ` SinkOperator ` ] while the receiver implements [ ` SourceOperator ` ] . This function adds both operators to the circuit and registers a dependency between them making sure that the scheduler will evaluate the sender before the receiver even though there is no explicit stream connecting them . Returns the output stream produced by the receiver operator .
pub fn add_exchange<I, SndOp, O, RcvOp>(
        &self,
        sender: SndOp,
        receiver: RcvOp,
        input_stream: &Stream<Self, I>,
    ) -> Stream<Self, O>
    where
        I: Data,
        O: Data,
        SndOp: SinkOperator<I>,
        RcvOp: SourceOperator<O>,
    {
        let preference = sender.input_preference();
        self.add_exchange_with_preference(sender, receiver, input_stream, preference)
    }
pub fn add_exchange < I , SndOp , O , RcvOp > ( & self , sender : SndOp , receiver : RcvOp , input_stream : & Stream < Self , I > , ) -> Stream < Self , O > where I : Data , O : Data , SndOp : SinkOperator < I > , RcvOp : SourceOperator < O > , { let preference = sender . input_preference ( ) ; self . add_exchange_with_preference ( sender , receiver , input_stream , preference ) }
Add a pair of operators that implement cross-worker communication.
Add a pair of operators that implement cross - worker communication .
&self
sender
SndOp
receiver
RcvOp
input_stream
&Stream<Self, I>