Skip to main content

App

Struct App 

Source
pub struct App { /* private fields */ }

Implementations§

Source§

impl App

Source

pub const DEFAULT_SETTLE_PASSES: usize = 8

Source

pub const MAX_SETTLE_PASSES: usize = 32

Source

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.

Source

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.

Source

pub fn graph_stats(&self) -> GraphStats

Explicit live graph diagnostic; never called by the host frame loop.

Source

pub fn profile(&self) -> Option<Profile>

Source

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.

Source

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.

Source

pub fn new<R: Render + 'static>(factory: impl FnOnce(RuntimeId) -> R) -> Self

Source

pub fn with_host<R: Render + 'static>( host: Rc<dyn Host>, factory: impl FnOnce(RuntimeId) -> R, ) -> Self

Source

pub fn memory() -> Self

Source

pub fn scope(&self) -> &Scope

Source

pub fn runtime(&self) -> &Runtime

Source

pub fn style_profile(&self) -> Profile

Source

pub fn runtime_stats(&self) -> RuntimeStats

Source

pub fn tree(&self) -> Ref<'_, Memory>

The semantic model may include staged changes. This is not a screen snapshot.

Source

pub fn stats(&self) -> UiStats

Source

pub fn mount(&self, widget: impl Widget) -> Result

Source

pub fn clear(&self) -> Result

Source

pub fn flush(&self) -> Result

Source

pub fn dispatch(&self, node: NodeId, event: Event) -> Result<bool>

Source

pub fn pump(&self) -> Result<usize>

All events delivered in this host tick share one reactive/render flush.

Source

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.

Source

pub fn cancel_request(&self, token: QueryToken) -> Result<bool>

Trait Implementations§

Source§

impl Drop for App

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for App

§

impl !Send for App

§

impl !Sync for App

§

impl !UnwindSafe for App

§

impl Freeze for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.