summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/input.rs2
-rw-r--r--src/user_interface.rs14
2 files changed, 13 insertions, 3 deletions
diff --git a/src/input.rs b/src/input.rs
index 613d83f1..097fa730 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -1,4 +1,4 @@
-//! Map your system events into input events that Iced can understand.
+//! Map your system events into input events that the runtime can understand.
pub mod keyboard;
pub mod mouse;
diff --git a/src/user_interface.rs b/src/user_interface.rs
index f64fe74b..3482c9b9 100644
--- a/src/user_interface.rs
+++ b/src/user_interface.rs
@@ -5,10 +5,10 @@ use stretch::result;
/// A set of interactive graphical elements with a specific [`Layout`].
///
-/// Use this to build, update, and draw your GUI!
+/// It can be updated and drawn.
///
/// Iced tries to avoid dictating how to write your event loop. You are in
-/// charge of integrating Iced in your system in any way you want.
+/// charge of using this type in your system in any way you want.
///
/// [`Layout`]: struct.Layout.html
pub struct UserInterface<'a, Message, Renderer> {
@@ -280,6 +280,9 @@ impl<'a, Message, Renderer> UserInterface<'a, Message, Renderer> {
}
}
+/// Reusable data of a specific [`UserInterface`].
+///
+/// [`UserInterface`]: struct.UserInterface.html
#[derive(Debug, Clone)]
pub struct Cache {
hash: u64,
@@ -288,6 +291,13 @@ pub struct Cache {
}
impl Cache {
+ /// Creates an empty [`Cache`].
+ ///
+ /// You should use this to initialize a [`Cache`] before building your first
+ /// [`UserInterface`].
+ ///
+ /// [`Cache`]: struct.Cache.html
+ /// [`UserInterface`]: struct.UserInterface.html
pub fn new() -> Cache {
let root: Element<'_, (), ()> = Column::new().into();