summaryrefslogtreecommitdiffstats
path: root/web/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-11-26 02:52:34 +0100
committerLibravatar GitHub <noreply@github.com>2020-11-26 02:52:34 +0100
commit1f7e8b7f3d1804c39c8e0934b25f3ef178de269c (patch)
tree380d9224b81537e460ea7f9fe84c0c912d3f4cbf /web/src/lib.rs
parentbffaeed9fd44619491c012cd9270043828c1849c (diff)
parent01322f69a406eee76014f5e2834336e2295ad80e (diff)
downloadiced-1f7e8b7f3d1804c39c8e0934b25f3ef178de269c.tar.gz
iced-1f7e8b7f3d1804c39c8e0934b25f3ef178de269c.tar.bz2
iced-1f7e8b7f3d1804c39c8e0934b25f3ef178de269c.zip
Merge pull request #632 from hecrj/improvement/update-docs
Use intra-doc links
Diffstat (limited to 'web/src/lib.rs')
-rw-r--r--web/src/lib.rs29
1 files changed, 3 insertions, 26 deletions
diff --git a/web/src/lib.rs b/web/src/lib.rs
index b7970c56..3b613353 100644
--- a/web/src/lib.rs
+++ b/web/src/lib.rs
@@ -96,33 +96,21 @@ pub use executor::Executor;
/// by returning a [`Command`](struct.Command.html) in some of its methods.
pub trait Application {
/// The [`Executor`] that will run commands and subscriptions.
- ///
- /// The [`executor::WasmBindgen`] can be a good choice for the Web.
- ///
- /// [`Executor`]: trait.Executor.html
- /// [`executor::Default`]: executor/struct.Default.html
type Executor: Executor;
/// The type of __messages__ your [`Application`] will produce.
- ///
- /// [`Application`]: trait.Application.html
type Message: Send;
/// The data needed to initialize your [`Application`].
- ///
- /// [`Application`]: trait.Application.html
type Flags;
/// Initializes the [`Application`].
///
/// Here is where you should return the initial state of your app.
///
- /// Additionally, you can return a [`Command`](struct.Command.html) if you
- /// need to perform some async action in the background on startup. This is
- /// useful if you want to load state from a file, perform an initial HTTP
- /// request, etc.
- ///
- /// [`Application`]: trait.Application.html
+ /// Additionally, you can return a [`Command`] if you need to perform some
+ /// async action in the background on startup. This is useful if you want to
+ /// load state from a file, perform an initial HTTP request, etc.
fn new(flags: Self::Flags) -> (Self, Command<Self::Message>)
where
Self: Sized;
@@ -131,8 +119,6 @@ pub trait Application {
///
/// This title can be dynamic! The runtime will automatically update the
/// title of your application when necessary.
- ///
- /// [`Application`]: trait.Application.html
fn title(&self) -> String;
/// Handles a __message__ and updates the state of the [`Application`].
@@ -142,16 +128,11 @@ pub trait Application {
/// this method.
///
/// Any [`Command`] returned will be executed immediately in the background.
- ///
- /// [`Application`]: trait.Application.html
- /// [`Command`]: struct.Command.html
fn update(&mut self, message: Self::Message) -> Command<Self::Message>;
/// Returns the widgets to display in the [`Application`].
///
/// These widgets can produce __messages__ based on user interaction.
- ///
- /// [`Application`]: trait.Application.html
fn view(&mut self) -> Element<'_, Self::Message>;
/// Returns the event [`Subscription`] for the current state of the
@@ -162,15 +143,11 @@ pub trait Application {
/// [`update`](#tymethod.update).
///
/// By default, this method returns an empty [`Subscription`].
- ///
- /// [`Subscription`]: struct.Subscription.html
fn subscription(&self) -> Subscription<Self::Message> {
Subscription::none()
}
/// Runs the [`Application`].
- ///
- /// [`Application`]: trait.Application.html
fn run(flags: Self::Flags)
where
Self: 'static + Sized,