pub struct UnixTerminal { /* private fields */ }
Expand description

A unix style terminal

Implementations

Attempt to create an instance from the stdin and stdout of the process. This will fail unless both are associated with a tty. Note that this will duplicate the underlying file descriptors and will no longer participate in the stdin/stdout locking provided by the rust standard library.

Attempt to explicitly open a handle to the terminal device (/dev/tty) and build a UnixTerminal from there. This will yield a terminal even if the stdio streams have been redirected, provided that the process has an associated controlling terminal.

Trait Implementations

Executes the destructor for this type. Read more

Raw mode disables input line buffering, allowing data to be read as the user presses keys, disables local echo, so keys pressed by the user do not implicitly render to the terminal output, and disables canonicalization of unix newlines to CRLF. Read more

Enter the alternate screen. The alternate screen will be left automatically when the Terminal is dropped. Read more

Exit the alternate screen.

Queries the current screen size, returning width, height.

Sets the current screen size

Render a series of changes to the terminal output

Flush any buffered output

Check for a parsed input event. wait indicates the behavior in the case that no input is immediately available. If wait is None then poll_input will not return until an event is available. If wait is Some(duration) then poll_input will wait up to the given duration for an event before returning with a value of Ok(None). If wait is Some(Duration::ZERO) then the poll is non-blocking. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.