[][src]Struct prototty_ansi_terminal::Context

pub struct Context { /* fields omitted */ }

An interface to a terminal for rendering Views, and getting input.

Methods

impl Context[src]

pub fn new() -> Result<Self>[src]

Initialise a new context using the current terminal.

pub fn from_terminal(terminal: Terminal) -> Result<Self>[src]

pub fn drain_input(&mut self) -> Result<Drain<'a, Input>>[src]

pub fn poll_input(&mut self) -> Result<Option<Input>>[src]

Gets an input event from the terminal if one is present, returning immediately.

pub fn wait_input(&mut self) -> Result<Input>[src]

Gets an input event from the terminal, waiting until an event occurs.

pub fn wait_input_timeout(&mut self, timeout: Duration) -> Result<Option<Input>>[src]

Gets an input event from the terminal, waiting until either an event occurs, or the timeout expires, in which case this method returns None.

pub fn run_app<A, E>(self, app: A, col_encode: E) where
    A: App + 'static,
    E: ColEncode
[src]

pub fn size(&self) -> Result<Size>[src]

Auto Trait Implementations

impl RefUnwindSafe for Context

impl Send for Context

impl Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.