From e1e42f87bdccb21c8c27e88063abd87bbdd22832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 2 Apr 2020 03:00:48 +0200 Subject: [PATCH] Add examples to `subscription::Recipe` docs --- futures/src/subscription.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 std::fmt::Debug for Subscription { /// /// [`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 { /// The events that will be produced by a [`Subscription`] with this /// [`Recipe`].