Trait linefeed::terminal::Terminal
[−]
[src]
pub trait Terminal: Sized + Send + Sync { type PrepareState; fn name(&self) -> &str; fn lock_read<'a>(&'a self) -> Box<TerminalReader<Self> + 'a>; fn lock_write<'a>(&'a self) -> Box<TerminalWriter<Self> + 'a>; }
Defines a low-level interface to the terminal
Associated Types
type PrepareState
Returned by prepare
; passed to restore
to restore state.
Required Methods
fn name(&self) -> &str
Returns the name of the terminal.
ⓘImportant traits for Box<W>
fn lock_read<'a>(&'a self) -> Box<TerminalReader<Self> + 'a>
Acquires a lock on terminal read operations and returns a value holding that lock and granting access to such operations.
The lock must not be released until the returned value is dropped.
ⓘImportant traits for Box<W>
fn lock_write<'a>(&'a self) -> Box<TerminalWriter<Self> + 'a>
Acquires a lock on terminal write operations and returns a value holding that lock and granting access to such operations.
The lock must not be released until the returned value is dropped.
Implementors
impl Terminal for MemoryTerminal type PrepareState = ();
impl Terminal for DefaultTerminal type PrepareState = PrepareState;