stream: update features and doc for broadcast/watch stream (#3504)

This commit is contained in:
Alice Ryhl
2021-02-05 20:39:27 +01:00
committed by GitHub
parent fcb6d041b9
commit 0a04954d5c
7 changed files with 37 additions and 6 deletions
+1
View File
@@ -12,6 +12,7 @@ use std::task::{Context, Poll};
///
/// [`tokio::sync::broadcast::Receiver`]: struct@tokio::sync::broadcast::Receiver
/// [`Stream`]: trait@crate::Stream
#[cfg_attr(docsrs, doc(cfg(feature = "sync")))]
pub struct BroadcastStream<T> {
inner: ReusableBoxFuture<(Result<T, RecvError>, Receiver<T>)>,
}
+1
View File
@@ -12,6 +12,7 @@ use tokio::sync::watch::error::RecvError;
///
/// [`tokio::sync::watch::Receiver`]: struct@tokio::sync::watch::Receiver
/// [`Stream`]: trait@crate::Stream
#[cfg_attr(docsrs, doc(cfg(feature = "sync")))]
pub struct WatchStream<T> {
inner: ReusableBoxFuture<(Result<(), RecvError>, Receiver<T>)>,
}