[][src]Function mogwai::txrx::txrx_filter_fold

pub fn txrx_filter_fold<A, B, T, F>(t: T, f: F) -> (Transmitter<A>, Receiver<B>) where
    A: 'static,
    B: 'static,
    T: 'static,
    F: Fn(&mut T, &A) -> Option<B> + 'static, 

Create a linked, filtering Transmitter<A> and Receiver<B> pair with internal state.

Using the given filtering fold function, messages sent on the transmitter will be folded into the given internal state and output messages may or may not be sent to the receiver.

In the case that the return value of the given function is None, no message will be sent to the receiver.