summaryrefslogtreecommitdiffstats
path: root/futures/src/subscription.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-04-02 16:53:54 +0200
committerLibravatar GitHub <noreply@github.com>2020-04-02 16:53:54 +0200
commit3aafd2c1f7539806449b116fa98d6bf0fff94de8 (patch)
tree727eb202e24d66836065e89c279d400c053563c0 /futures/src/subscription.rs
parent2fa6edf7a8b2a6e06b42ff9879fe81cbd1a957c6 (diff)
parent4a498ed0e3d0526ce9f47b7eefa0b2716f9b27a8 (diff)
downloadiced-3aafd2c1f7539806449b116fa98d6bf0fff94de8.tar.gz
iced-3aafd2c1f7539806449b116fa98d6bf0fff94de8.tar.bz2
iced-3aafd2c1f7539806449b116fa98d6bf0fff94de8.zip
Merge pull request #252 from hecrj/improvement/documentation
Update and improve documentation
Diffstat (limited to '')
-rw-r--r--futures/src/subscription.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs
index ab333a20..7a75fc31 100644
--- a/futures/src/subscription.rs
+++ b/futures/src/subscription.rs
@@ -142,6 +142,18 @@ impl<I, O, H> std::fmt::Debug for Subscription<I, O, H> {
///
/// [`Subscription`]: struct.Subscription.html
/// [`Recipe`]: trait.Recipe.html
+///
+/// # Examples
+/// The repository has a couple of [examples] that use a custom [`Recipe`]:
+///
+/// - [`download_progress`], a basic application that asynchronously downloads
+/// a dummy file of 100 MB and tracks the download progress.
+/// - [`stopwatch`], a watch with start/stop and reset buttons showcasing how
+/// to listen to time.
+///
+/// [examples]: https://github.com/hecrj/iced/tree/0.1/examples
+/// [`download_progress`]: https://github.com/hecrj/iced/tree/0.1/examples/download_progress
+/// [`stopwatch`]: https://github.com/hecrj/iced/tree/0.1/examples/stopwatch
pub trait Recipe<Hasher: std::hash::Hasher, Event> {
/// The events that will be produced by a [`Subscription`] with this
/// [`Recipe`].