pub struct App { /* private fields */ }Implementations§
Source§impl App
impl App
pub const DEFAULT_SETTLE_PASSES: usize = 8
pub const MAX_SETTLE_PASSES: usize = 32
Sourcepub fn settle(&self, limit: usize) -> Result<Settle>
pub fn settle(&self, limit: usize) -> Result<Settle>
Observe/flush before drawing, with a strict pass budget. Pending work yields to the host rather than becoming a runaway error. Adapters opt into additional local passes; browser RAF and external I/O are not spun.
Sourcepub fn buffer_stats(&self) -> BufferStats
pub fn buffer_stats(&self) -> BufferStats
Pending and idle-spare capacity; excludes batches currently being processed. Slot/byte counts describe Vec storage, not RSS or live data.
Sourcepub fn graph_stats(&self) -> GraphStats
pub fn graph_stats(&self) -> GraphStats
Explicit live graph diagnostic; never called by the host frame loop.
pub fn profile(&self) -> Option<Profile>
Sourcepub fn set_profile(&self, profile: Option<Profile>)
pub fn set_profile(&self, profile: Option<Profile>)
Attach one shared collector to runtime, UI and supported renderer phases. None stops future spans; snapshots already retained by callers survive.
Sourcepub fn mount_with<W: Widget>(&self, factory: impl FnOnce() -> W) -> Result
pub fn mount_with<W: Widget>(&self, factory: impl FnOnce() -> W) -> Result
Construct maps/resources inside the mounted widget’s owner. Use this for repeated root mounting when input signals belong to the app scope.
pub fn new<R: Render + 'static>(factory: impl FnOnce(RuntimeId) -> R) -> Self
pub fn with_host<R: Render + 'static>( host: Rc<dyn Host>, factory: impl FnOnce(RuntimeId) -> R, ) -> Self
pub fn memory() -> Self
pub fn scope(&self) -> &Scope
pub fn runtime(&self) -> &Runtime
pub fn style_profile(&self) -> Profile
pub fn runtime_stats(&self) -> RuntimeStats
Sourcepub fn tree(&self) -> Ref<'_, Memory>
pub fn tree(&self) -> Ref<'_, Memory>
The semantic model may include staged changes. This is not a screen snapshot.
pub fn stats(&self) -> UiStats
pub fn mount(&self, widget: impl Widget) -> Result
pub fn clear(&self) -> Result
pub fn flush(&self) -> Result
pub fn dispatch(&self, node: NodeId, event: Event) -> Result<bool>
Sourcepub fn pump(&self) -> Result<usize>
pub fn pump(&self) -> Result<usize>
All events delivered in this host tick share one reactive/render flush.
Sourcepub fn request(
&self,
query: Query,
reply: impl FnOnce(Result<QueryValue, RenderError>) + 'static,
) -> Result<QueryToken>
pub fn request( &self, query: Query, reply: impl FnOnce(Result<QueryValue, RenderError>) + 'static, ) -> Result<QueryToken>
Application-lifetime observation. Use Scope::request for widget/row waiters that must be released when their requesting Scope is disposed.