pub fn close(&mut self) {
        if let Some(inner) = &mut self.inner {
            inner.set_closed();
        }
    }
Closes the receiving half of a channel, without dropping it.

This prevents any further messages from being sent on the channel while
still enabling the receiver to drain messages that are buffered.
futures-channel/src/mpsc/mod.rs