[][src]Function mogwai::txrx::txrx_filter_map

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

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

Using the given filtering map function, messages sent on the transmitter are mapped to output messages that 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.