Struct linefeed::terminal::DefaultTerminal
source · pub struct DefaultTerminal(_);
Expand description
Default Terminal
interface
Implementations
sourceimpl DefaultTerminal
impl DefaultTerminal
sourcepub fn new() -> Result<DefaultTerminal>
pub fn new() -> Result<DefaultTerminal>
Opens access to the terminal device associated with standard output.
sourcepub fn stderr() -> Result<DefaultTerminal>
pub fn stderr() -> Result<DefaultTerminal>
Opens access to the terminal device associated with standard error.
Trait Implementations
sourceimpl Terminal for DefaultTerminal
impl Terminal for DefaultTerminal
type PrepareState = PrepareState
type PrepareState = PrepareState
Returned by
prepare
; passed to restore
to restore state.sourcefn lock_read<'a>(&'a self) -> Box<dyn TerminalReader<Self> + 'a>
fn lock_read<'a>(&'a self) -> Box<dyn TerminalReader<Self> + 'a>
Acquires a lock on terminal read operations and returns a value holding
that lock and granting access to such operations. Read more
sourcefn lock_write<'a>(&'a self) -> Box<dyn TerminalWriter<Self> + 'a>
fn lock_write<'a>(&'a self) -> Box<dyn TerminalWriter<Self> + 'a>
Acquires a lock on terminal write operations and returns a value holding
that lock and granting access to such operations. Read more
sourceimpl<'a> TerminalReader<DefaultTerminal> for TerminalReadGuard<'a>
impl<'a> TerminalReader<DefaultTerminal> for TerminalReadGuard<'a>
sourcefn prepare(
&mut self,
block_signals: bool,
report_signals: SignalSet
) -> Result<PrepareState>
fn prepare(
&mut self,
block_signals: bool,
report_signals: SignalSet
) -> Result<PrepareState>
Prepares the terminal for line reading and editing operations. Read more
sourceunsafe fn prepare_with_lock(
&mut self,
lock: &mut dyn TerminalWriter<DefaultTerminal>,
block_signals: bool,
report_signals: SignalSet
) -> Result<PrepareState>
unsafe fn prepare_with_lock(
&mut self,
lock: &mut dyn TerminalWriter<DefaultTerminal>,
block_signals: bool,
report_signals: SignalSet
) -> Result<PrepareState>
Like
prepare
, but called when the write lock is already held. Read moresourcefn restore(&mut self, state: PrepareState) -> Result<()>
fn restore(&mut self, state: PrepareState) -> Result<()>
Restores the terminal state using the given state data.
sourceunsafe fn restore_with_lock(
&mut self,
lock: &mut dyn TerminalWriter<DefaultTerminal>,
state: PrepareState
) -> Result<()>
unsafe fn restore_with_lock(
&mut self,
lock: &mut dyn TerminalWriter<DefaultTerminal>,
state: PrepareState
) -> Result<()>
Like
restore
, but called when the write lock is already held. Read moresourceimpl<'a> TerminalWriter<DefaultTerminal> for TerminalWriteGuard<'a>
impl<'a> TerminalWriter<DefaultTerminal> for TerminalWriteGuard<'a>
sourcefn clear_screen(&mut self) -> Result<()>
fn clear_screen(&mut self) -> Result<()>
Presents a clear terminal screen, with cursor at first row, first column. Read more
sourcefn clear_to_screen_end(&mut self) -> Result<()>
fn clear_to_screen_end(&mut self) -> Result<()>
Clears characters on the line occupied by the cursor, beginning with the
cursor and ending at the end of the line. Also clears all characters on
all lines after the cursor. Read more
sourcefn move_right(&mut self, n: usize) -> Result<()>
fn move_right(&mut self, n: usize) -> Result<()>
Moves the cursor right
n
cells; n
may be zero.sourcefn move_to_first_column(&mut self) -> Result<()>
fn move_to_first_column(&mut self) -> Result<()>
Moves the cursor to the first column of the current line
sourcefn set_cursor_mode(&mut self, mode: CursorMode) -> Result<()>
fn set_cursor_mode(&mut self, mode: CursorMode) -> Result<()>
Set the current cursor mode
Auto Trait Implementations
impl RefUnwindSafe for DefaultTerminal
impl Send for DefaultTerminal
impl Sync for DefaultTerminal
impl Unpin for DefaultTerminal
impl UnwindSafe for DefaultTerminal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more