pub struct Runtime<A, B = DefaultTerminal> { /* private fields */ }Expand description
A blocking full-screen application runtime.
Runtime::new uses the production executor, clock, and TUI session
profile. With the crossterm feature it also supplies a production
terminal backend: graphics-enabled Unix builds use the native bidirectional
connection for capability queries, and other builds use Crossterm. A
runtime-only build must provide one with
backend. Builders replace those boundaries or
individual session choices before run takes ownership and
blocks the calling thread.
Implementations§
Source§impl<A, B> Runtime<A, B>
impl<A, B> Runtime<A, B>
Sourcepub fn backend<U>(self, backend: U) -> Runtime<A, U>where
U: TerminalBackend + Send + 'static,
pub fn backend<U>(self, backend: U) -> Runtime<A, U>where
U: TerminalBackend + Send + 'static,
Replaces the physical connection used for the session, input, and queries.
Sourcepub fn executor(self, executor: impl Executor) -> Self
pub fn executor(self, executor: impl Executor) -> Self
Replaces the executor used by effects and subscriptions.
Sourcepub fn clock(self, clock: impl Clock) -> Self
pub fn clock(self, clock: impl Clock) -> Self
Replaces the clock used by effects and frame scheduling.
Sourcepub const fn raw_mode(self, enabled: bool) -> Self
pub const fn raw_mode(self, enabled: bool) -> Self
Enables or disables raw input mode for the session.
Sourcepub const fn alternate_screen(self, enabled: bool) -> Self
pub const fn alternate_screen(self, enabled: bool) -> Self
Enables or disables the alternate screen for the session.
Sourcepub const fn bracketed_paste(self, enabled: bool) -> Self
pub const fn bracketed_paste(self, enabled: bool) -> Self
Enables or disables bracketed-paste reporting.
Sourcepub const fn focus_change(self, enabled: bool) -> Self
pub const fn focus_change(self, enabled: bool) -> Self
Enables or disables focus-change reporting.
Sourcepub const fn keyboard_enhancement(
self,
flags: Option<KeyboardEnhancementFlags>,
) -> Self
pub const fn keyboard_enhancement( self, flags: Option<KeyboardEnhancementFlags>, ) -> Self
Selects the enhanced-keyboard information requested when supported.
Sourcepub const fn hide_cursor(self, enabled: bool) -> Self
pub const fn hide_cursor(self, enabled: bool) -> Self
Hides the cursor until a frame places it or the session restores it.