Write missing documentation in iced_widget
This commit is contained in:
parent
de638f44a5
commit
b60194844a
5 changed files with 15 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ use std::cell::RefCell;
|
|||
use std::hash::{Hash, Hasher as H};
|
||||
use std::rc::Rc;
|
||||
|
||||
/// A widget that only rebuilds its contents when necessary.
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub struct Lazy<'a, Message, Renderer, Dependency, View> {
|
||||
dependency: Dependency,
|
||||
|
|
@ -41,6 +42,8 @@ where
|
|||
Dependency: Hash + 'a,
|
||||
View: Into<Element<'static, Message, Renderer>>,
|
||||
{
|
||||
/// Creates a new [`Lazy`] widget with the given data `Dependency` and a
|
||||
/// closure that can turn this data into a widget tree.
|
||||
pub fn new(
|
||||
dependency: Dependency,
|
||||
view: impl Fn(&Dependency) -> View + 'a,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue