We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d2ad0e commit 2fa7babCopy full SHA for 2fa7bab
futures-channel/src/mpsc/mod.rs
@@ -1020,6 +1020,11 @@ impl<T> Receiver<T> {
1020
/// It is not recommended to call this function from inside of a future,
1021
/// only when you've otherwise arranged to be notified when the channel is
1022
/// no longer empty.
1023
+ ///
1024
+ /// This function returns:
1025
+ /// * `Ok(Some(t))` when message is fetched
1026
+ /// * `Ok(None)` when channel is closed and no messages left in the queue
1027
+ /// * `Err(e)` when there are no messages available, but channel is not yet closed
1028
pub fn try_next(&mut self) -> Result<Option<T>, TryRecvError> {
1029
match self.next_message() {
1030
Poll::Ready(msg) => {
0 commit comments