[][src]Function mogwai::txrx::txrx_filter_fold_shared

pub fn txrx_filter_fold_shared<A, B, T, F>(
    var: Rc<RefCell<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 shared state.

Using the given filtering fold function, messages sent on the transmitter will be folded into the given shared 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.