[−][src]Struct prototty_unix::Context
An interface to a terminal for rendering View
s, and getting input.
Methods
impl Context<DefaultColourConfig>
[src]
pub fn new() -> Result<Self>
[src]
Initialise a new context using the current terminal.
pub fn from_terminal(terminal: Terminal) -> Result<Self>
[src]
impl<C: ColourConfig> Context<C>
[src]
pub fn with_colour_config(colour_config: C) -> Result<Self>
[src]
pub fn from_terminal_with_colour_config(
terminal: Terminal,
colour_config: C
) -> Result<Self>
[src]
terminal: Terminal,
colour_config: C
) -> Result<Self>
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 render<V: View<T>, T>(&mut self, view: &mut V, data: T) -> Result<()>
[src]
pub fn render_at<V: View<T>, T, R: ViewTransformRgb24>(
&mut self,
view: &mut V,
data: T,
context: ViewContext<R>
) -> Result<()>
[src]
&mut self,
view: &mut V,
data: T,
context: ViewContext<R>
) -> Result<()>
pub fn size(&self) -> Result<Size>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,