pub fn close(&mut self) {
        match self.state {
            State::Open(ref inner) => {
                let mut inner = inner.borrow_mut();
                inner.tx_task.wake();
                let value = inner.value.take();
                drop(inner);

                self.state = State::Closed(value);
            }
            State::Closed(_) => {}
        };
    }
/// Gracefully close this receiver, preventing sending any future messages.
///
/// Any `send` operation which happens after this method returns is
/// guaranteed to fail. Once this method is called the normal `poll` method
/// can be used to determine whether a message was actually sent or not. If
/// `Canceled` is returned from `poll` then no message was sent.
Gracefully close this receiver, preventing sending any future messages.
Any `send` operation which happens after this method returns is
guaranteed to fail. Once this method is called the normal `poll` method
can be used to determine whether a message was actually sent or not. If
`Canceled` is returned from `poll` then no message was sent.
Gracefully close this receiver preventing sending any future messages . Any ` send ` operation which happens after this method returns is guaranteed to fail . Once this method is called the normal ` poll ` method can be used to determine whether a message was actually sent or not . If ` Canceled ` is returned from ` poll ` then no message was sent .
pub fn close(&mut self) {
        match self.state {
            State::Open(ref inner) => {
                let mut inner = inner.borrow_mut();
                inner.tx_task.wake();
                let value = inner.value.take();
                drop(inner);
                self.state = State::Closed(value);
            }
            State::Closed(_) => {}
        };
    }
pub fn close ( & mut self ) { match self . state { State :: Open ( ref inner ) => { let mut inner = inner . borrow_mut ( ) ; inner . tx_task . wake ( ) ; let value = inner . value . take ( ) ; drop ( inner ) ; self . state = State :: Closed ( value ) ; } State :: Closed ( _ ) => { } } ; }
Gracefully close this receiver, preventing sending any future messages.
Gracefully close this receiver preventing sending any future messages .
&mut self