pub fn try_recv(&mut self) -> Poll<Option<T>> {
        if let Some(channel) = self.channel.take() {
            if let Poll::Ready((result, dropped)) = unsafe { channel.to_ref() }.read(None, false) {
                if dropped {
                    unsafe { channel.dealloc() };
                } else {
                    self.channel.replace(channel);
                }
                Poll::Ready(result)
            } else {
                self.channel.replace(channel);
                Poll::Pending
            }
        } else {
            Poll::Ready(None)
        }
    }
/// Try to receive the next value from the stream.
Try to receive the next value from the stream.
Try to receive the next value from the stream .
pub fn try_recv(&mut self) -> Poll<Option<T>> {
        if let Some(channel) = self.channel.take() {
            if let Poll::Ready((result, dropped)) = unsafe { channel.to_ref() }.read(None, false) {
                if dropped {
                    unsafe { channel.dealloc() };
                } else {
                    self.channel.replace(channel);
                }
                Poll::Ready(result)
            } else {
                self.channel.replace(channel);
                Poll::Pending
            }
        } else {
            Poll::Ready(None)
        }
    }
pub fn try_recv ( & mut self ) -> Poll < Option < T > > { if let Some ( channel ) = self . channel . take ( ) { if let Poll :: Ready ( ( result , dropped ) ) = unsafe { channel . to_ref ( ) } . read ( None , false ) { if dropped { unsafe { channel . dealloc ( ) } ; } else { self . channel . replace ( channel ) ; } Poll :: Ready ( result ) } else { self . channel . replace ( channel ) ; Poll :: Pending } } else { Poll :: Ready ( None ) } }
Try to receive the next value from the stream.
Try to receive the next value from the stream .
&mut self
&mut self