pub struct Terminal<C, I, O> {
pub control: C,
pub input: I,
pub output: O,
}
Expand description
Your main gate to TUI to set up Termit.
let mut termit = Terminal::try_system_default()?.into_termit::<NoAppEvent>();
Terminal on it’s own doesn’t reset the terminal back to it’s initial state (raw mode, styles, captures…)
Termit does that. We get a Termit
instance by calling Terminal::into_termit()
. Use that to build your app.
Fields§
§control: C
§input: I
§output: O
Implementations§
source§impl<'a, C, I, O> Terminal<C, I, O>where
C: Control + 'a,
I: AsyncRead + 'a,
O: Write + 'a,
impl<'a, C, I, O> Terminal<C, I, O>where C: Control + 'a, I: AsyncRead + 'a, O: Write + 'a,
pub fn into_termit<A: AppEvent>(self) -> Termit<'a, A>
source§impl Terminal<NixTty, AsyncReader<Stdin>, Stdout>
impl Terminal<NixTty, AsyncReader<Stdin>, Stdout>
pub fn try_system_default() -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl<C, I, O> RefUnwindSafe for Terminal<C, I, O>where C: RefUnwindSafe, I: RefUnwindSafe, O: RefUnwindSafe,
impl<C, I, O> Send for Terminal<C, I, O>where C: Send, I: Send, O: Send,
impl<C, I, O> Sync for Terminal<C, I, O>where C: Sync, I: Sync, O: Sync,
impl<C, I, O> Unpin for Terminal<C, I, O>where C: Unpin, I: Unpin, O: Unpin,
impl<C, I, O> UnwindSafe for Terminal<C, I, O>where C: UnwindSafe, I: UnwindSafe, O: UnwindSafe,
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