pub struct Runtime { /* private fields */ }Expand description
An owned application driven one event/tick at a time. Browser hosts and automation use the same passes, input handling and software renderer as native windows.
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn set_agent_enabled(&mut self, enabled: bool)
pub fn set_agent_enabled(&mut self, enabled: bool)
Explicitly opt into the same control dispatcher used by native JSON/MCP sessions.
Source§impl Runtime
impl Runtime
Sourcepub fn new(
desc: &AppDesc,
app: impl App + 'static,
style: &'static dyn Style,
) -> Result<Self, i32>
pub fn new( desc: &AppDesc, app: impl App + 'static, style: &'static dyn Style, ) -> Result<Self, i32>
Initialize a headless surface with the normal command-line/theme configuration.
Err(2) means application initialization or framebuffer allocation failed.
Sourcepub fn step(&mut self, now_ms: u32, events: &[Event]) -> bool
pub fn step(&mut self, now_ms: u32, events: &[Event]) -> bool
Apply input edges and due timers, then render if required. False means closed. Time is milliseconds since initialization; it must advance monotonically.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl !UnwindSafe for Runtime
impl Forget for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
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