[][src]Struct unsegen_terminal::Terminal

pub struct Terminal { /* fields omitted */ }

unsegen Widget that models a pseudoterminal and displays its contents to the window when drawn.

Use ScrollBehavior to scroll in the (potentially infinite buffer) and WriteBehavior to pass specific keystrokes to the terminal.

Methods

impl Terminal[src]

pub fn new<S: SlaveInputSink + 'static>(input_sink: S) -> Result<Self>[src]

Create a Terminal which will use the provided SlaveInputSink to notify the user of new input from the pty.

This method will create a posix pty. The associated file (path) can be obtained using get_slave_name.

pub fn add_byte_input(&mut self, bytes: &[u8])[src]

Add raw byte input to the terminal window. Call this for bytes that you received (indirectly) from SlaveInputSink::receive_bytes_from_pty.

pub fn slave_name(&self) -> &OsStr[src]

Get the name of the slave pseudoterminal that is associated with the Terminal.

(c.f. posix ptsname)

Trait Implementations

impl<P: ?Sized> Container<P> for Terminal[src]

Default container behavior:

Scroll using PageUp/PageDown, jump to beginning/end using Home/End and pass all other input to the slave terminal.

impl Widget for Terminal[src]

impl Scrollable for Terminal[src]

impl Writable for Terminal[src]

Auto Trait Implementations

impl Send for Terminal

impl !Sync for Terminal

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.