[][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.

Implementations

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 Scrollable for Terminal[src]

impl Widget for Terminal[src]

impl Writable for Terminal[src]

Auto Trait Implementations

impl !RefUnwindSafe for Terminal

impl Send for Terminal

impl !Sync for Terminal

impl Unpin for Terminal

impl UnwindSafe for Terminal

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.