pub struct Tui { /* private fields */ }Expand description
Main TUI handle that integrates with the event bus.
Implementations§
Source§impl Tui
impl Tui
Sourcepub fn with_hat_map(self, hat_map: HashMap<String, (HatId, String)>) -> Self
pub fn with_hat_map(self, hat_map: HashMap<String, (HatId, String)>) -> Self
Sets the hat map for dynamic topic-to-hat resolution.
This allows the TUI to display the correct hat for custom topics without hardcoding them in TuiState::update().
Sourcepub fn with_termination_signal(self, terminated_rx: Receiver<bool>) -> Self
pub fn with_termination_signal(self, terminated_rx: Receiver<bool>) -> Self
Sets the termination signal receiver for graceful shutdown.
The TUI will exit when this receiver signals true.
Sourcepub fn with_interrupt_tx(self, interrupt_tx: Sender<bool>) -> Self
pub fn with_interrupt_tx(self, interrupt_tx: Sender<bool>) -> Self
Sets the interrupt channel for Ctrl+C signaling.
In raw terminal mode, SIGINT is not generated by the OS when the user presses Ctrl+C. The TUI detects Ctrl+C via crossterm events and uses this channel to signal the main orchestration loop to terminate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tui
impl !RefUnwindSafe for Tui
impl Send for Tui
impl Sync for Tui
impl Unpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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