pub struct Tui { /* private fields */ }Implementations§
Source§impl Tui
impl Tui
Sourcepub fn start(target: String, bundle: String) -> Result<(Self, TuiHandle)>
pub fn start(target: String, bundle: String) -> Result<(Self, TuiHandle)>
Set up the inline TUI, install the stderr capture, and hand
back a (Tui, TuiHandle) pair. The cli keeps TuiHandle and
passes Tui to a dedicated OS thread that runs the render
loop (ratatui’s Terminal isn’t Send once it has a backend
holding raw fds — keep it pinned to one thread).
Sourcepub fn render_until_quit(&mut self) -> Result<()>
pub fn render_until_quit(&mut self) -> Result<()>
Drive the render loop until should_quit flips (either via
q / Esc / Ctrl-C in the terminal or via TuiHandle::request_quit
from the cli when its work finishes).
Sourcepub fn was_user_quit(&self) -> bool
pub fn was_user_quit(&self) -> bool
Whether the most recent quit signal came from a user keypress
rather than a TuiHandle::request_quit call. Callers use this
after render_until_quit returns to decide whether to
process::exit (user quit while the dev-server was running) or
to fall through and let the cli’s own return path run (cli
finished its work).
pub fn shutdown(self) -> Result<()>
Auto Trait Implementations§
impl !Sync for Tui
impl Freeze for Tui
impl RefUnwindSafe for Tui
impl Send for Tui
impl Unpin for Tui
impl UnsafeUnpin for Tui
impl UnwindSafe for Tui
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more