pub struct AppContext {
pub is_tty: bool,
pub info: ContextInfo,
pub queued_commands: Vec<OutputCommand>,
}Expand description
Standard context implementation using stdin/stdout/stderr
Fields§
§is_tty: bool§info: ContextInfo§queued_commands: Vec<OutputCommand>Implementations§
Source§impl AppContext
impl AppContext
Sourcepub fn new(info: ContextInfo) -> Self
pub fn new(info: ContextInfo) -> Self
Create a new AppContext
Automatically detects whether stdout is a TTY. Note: Raw mode is NOT enabled here - interactive components should manage raw mode themselves when needed.
Trait Implementations§
Source§impl Context for AppContext
impl Context for AppContext
Source§impl ReadEvent for AppContext
impl ReadEvent for AppContext
Source§fn read_event(&mut self) -> Result<InputEvent>
fn read_event(&mut self) -> Result<InputEvent>
Read a terminal event (blocking)
Auto Trait Implementations§
impl Freeze for AppContext
impl RefUnwindSafe for AppContext
impl Send for AppContext
impl Sync for AppContext
impl Unpin for AppContext
impl UnwindSafe for AppContext
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