pub struct Terminal { /* private fields */ }Expand description
Embedded terminal widget
Implementations§
Source§impl Terminal
impl Terminal
Sourcepub fn max_scrollback(self, lines: usize) -> Self
pub fn max_scrollback(self, lines: usize) -> Self
Set maximum scrollback lines
Sourcepub fn default_fg(self, color: Color) -> Self
pub fn default_fg(self, color: Color) -> Self
Set default foreground color
Sourcepub fn default_bg(self, color: Color) -> Self
pub fn default_bg(self, color: Color) -> Self
Set default background color
Sourcepub fn show_cursor(self, show: bool) -> Self
pub fn show_cursor(self, show: bool) -> Self
Show/hide cursor
Sourcepub fn cursor_style(self, style: CursorStyle) -> Self
pub fn cursor_style(self, style: CursorStyle) -> Self
Set cursor style
Sourcepub fn is_focused(&self) -> bool
pub fn is_focused(&self) -> bool
Check if focused
Sourcepub fn clear_line(&mut self)
pub fn clear_line(&mut self)
Clear current line
Sourcepub fn scroll_down(&mut self, lines: usize)
pub fn scroll_down(&mut self, lines: usize)
Scroll down
Sourcepub fn scroll_to_bottom(&mut self)
pub fn scroll_to_bottom(&mut self)
Scroll to bottom
Sourcepub fn scroll_to_top(&mut self)
pub fn scroll_to_top(&mut self)
Scroll to top
Sourcepub fn clear_input(&mut self)
pub fn clear_input(&mut self)
Clear input buffer
Sourcepub fn handle_key(&mut self, key: KeyEvent) -> Option<TerminalAction>
pub fn handle_key(&mut self, key: KeyEvent) -> Option<TerminalAction>
Handle key event
Sourcepub fn log_viewer(width: u16, height: u16) -> Self
pub fn log_viewer(width: u16, height: u16) -> Self
Create a log viewer terminal
Trait Implementations§
Source§impl StyledView for Terminal
impl StyledView for Terminal
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Auto Trait Implementations§
impl Freeze for Terminal
impl RefUnwindSafe for Terminal
impl Send for Terminal
impl Sync for Terminal
impl Unpin for Terminal
impl UnwindSafe for Terminal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().