[][src]Function mogwai::txrx::hand_clone

pub fn hand_clone<A>(rx: &Receiver<A>) -> Receiver<A>

Clone a receiver.

Warning!

Be careful with this function. Because of magic, calling Receiver::respond on a clone of a receiver sets the responder for both of those receivers. Under the hood they are the same responder. This is why Receiver has no Clone trait implementation.

Instead of cloning, if you need a new receiver that receives from the same transmitter you should use Receiver::branch, which comes in many flavors.