pub struct ListenableBuilder;Expand description
Builds again whenever a Listenable says it changed — the reference’s
ListenableBuilder.
A notifier asks for a rebuild when it tells its listeners, so what is built here is always built from the notifier’s present state: the notifier is kept so that the builder can read it, and to say in the tree what this part of it follows.
Implementations§
Source§impl ListenableBuilder
impl ListenableBuilder
Sourcepub fn new<L: Listenable + 'static>(
listenable: L,
build: impl Fn(&BuildContext<'_>, &L) -> Box<dyn Widget> + 'static,
) -> Component
pub fn new<L: Listenable + 'static>( listenable: L, build: impl Fn(&BuildContext<'_>, &L) -> Box<dyn Widget> + 'static, ) -> Component
A component that builds from listenable, whenever it changes.
Auto Trait Implementations§
impl Freeze for ListenableBuilder
impl RefUnwindSafe for ListenableBuilder
impl Send for ListenableBuilder
impl Sync for ListenableBuilder
impl Unpin for ListenableBuilder
impl UnsafeUnpin for ListenableBuilder
impl UnwindSafe for ListenableBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more