mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
Merge pull request #23 from frewsxcv/docs
Add links in docs to `channel` function.
This commit is contained in:
+7
-3
@@ -17,7 +17,9 @@ use reactor::{Handle, PollEvented};
|
|||||||
/// A `Sender` can be `clone`d to have multiple threads or instances sending
|
/// A `Sender` can be `clone`d to have multiple threads or instances sending
|
||||||
/// messages to one receiver.
|
/// messages to one receiver.
|
||||||
///
|
///
|
||||||
/// This type is created by the `channel` function.
|
/// This type is created by the [`channel`] function.
|
||||||
|
///
|
||||||
|
/// [`channel`]: fn.channel.html
|
||||||
pub struct Sender<T> {
|
pub struct Sender<T> {
|
||||||
tx: channel::Sender<T>,
|
tx: channel::Sender<T>,
|
||||||
}
|
}
|
||||||
@@ -28,8 +30,10 @@ pub struct Sender<T> {
|
|||||||
/// A `Receiver` cannot be cloned, so only one thread can receive messages at a
|
/// A `Receiver` cannot be cloned, so only one thread can receive messages at a
|
||||||
/// time.
|
/// time.
|
||||||
///
|
///
|
||||||
/// This type is created by the `channel` function and implements the `Stream`
|
/// This type is created by the [`channel`] function and implements the
|
||||||
/// trait to represent received messages.
|
/// `Stream` trait to represent received messages.
|
||||||
|
///
|
||||||
|
/// [`channel`]: fn.channel.html
|
||||||
pub struct Receiver<T> {
|
pub struct Receiver<T> {
|
||||||
rx: PollEvented<channel::Receiver<T>>,
|
rx: PollEvented<channel::Receiver<T>>,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user