Lines Matching refs:TryRecvError
262 pub enum TryRecvError { enum
281 impl fmt::Display for TryRecvError { implementation
284 TryRecvError::Empty => write!(f, "channel empty"), in fmt()
285 TryRecvError::Closed => write!(f, "channel closed"), in fmt()
286 TryRecvError::Lagged(amt) => write!(f, "channel lagged by {}", amt), in fmt()
291 impl std::error::Error for TryRecvError {} implementation
698 ) -> Result<RecvGuard<'_, T>, TryRecvError> { in recv_ref() argument
710 return Err(TryRecvError::Empty); in recv_ref()
759 return Err(TryRecvError::Empty); in recv_ref()
797 return Err(TryRecvError::Lagged(missed)); in recv_ref()
804 return Err(TryRecvError::Closed); in recv_ref()
922 pub fn try_recv(&mut self) -> Result<T, TryRecvError> { in try_recv() argument
924 guard.clone_value().ok_or(TryRecvError::Closed) in try_recv()
941 Err(TryRecvError::Closed) => break, in drop()
943 Err(TryRecvError::Lagged(..)) => {} in drop()
945 Err(TryRecvError::Empty) => panic!("unexpected empty broadcast channel"), in drop()
988 Err(TryRecvError::Empty) => return Poll::Pending, in poll()
989 Err(TryRecvError::Lagged(n)) => return Poll::Ready(Err(RecvError::Lagged(n))), in poll()
990 Err(TryRecvError::Closed) => return Poll::Ready(Err(RecvError::Closed)), in poll()