Expand description
App update service and other types.
The UPDATES service can execute arbitrary futures and setup update handlers. It can also be used to request update,
info rebuild, layout and render for any widget. Note that from inside the widget you should use the WIDGET service instead,
as it is more efficient.
The example below setups a handler that is called every app update.
use zng::prelude::*;
zng::update::UPDATES
.on_pre_update(hn!(|args| {
println!("pre_update #{}", args.count);
}))
.perm();Updates are coalesced, multiple requests for the same widget will cause it to only update once, and multiple widgets
can update on the same pass. See the Main Loop docs in the app module for more details.
§Full API
See zng_app::update for the full update API.
Structs§
- Context
Updates - Updates that must be reacted by an app owner.
- Event
Update - Represents a single event update.
- Info
Updates - Widget info updates of the current cycle.
- Layout
Updates - Widget layout updates of the current cycle.
- OnUpdate
Handle - Represents an
on_pre_updateoron_updatehandler. - Render
Updates - Widget render updates of the current cycle.
- UPDATES
- Update schedule service.
- Update
Args - Arguments for an
on_pre_update,on_updateorrunhandler. - Update
Delivery List - Represents all the widgets and windows marked to receive an update.
- Weak
OnUpdate Handle - Weak
OnUpdateHandle. - Widget
Updates - Widget updates of the current cycle.
Enums§
- Update
Op - Identify node and app-extension operations that can be requested.
Traits§
- Update
Subscribers - Represents a set of widgets that subscribe to an event source.
- Updates
Trace UiNode Ext - Extension methods for infinite loop diagnostics.