pub struct TerminalManager { /* private fields */ }Expand description
Manages terminal setup, teardown, and state
Implementations§
Source§impl TerminalManager
impl TerminalManager
Sourcepub fn new(config: TerminalConfig) -> Result<Self>
pub fn new(config: TerminalConfig) -> Result<Self>
Create a new terminal manager
Sourcepub fn terminal(&self) -> Option<&Terminal<CrosstermBackend<Stdout>>>
pub fn terminal(&self) -> Option<&Terminal<CrosstermBackend<Stdout>>>
Get a reference to the terminal
Sourcepub fn terminal_mut(
&mut self,
) -> Option<&mut Terminal<CrosstermBackend<Stdout>>>
pub fn terminal_mut( &mut self, ) -> Option<&mut Terminal<CrosstermBackend<Stdout>>>
Get a mutable reference to the terminal
Sourcepub fn is_released(&self) -> bool
pub fn is_released(&self) -> bool
Check if the terminal is currently released
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TerminalManager
impl RefUnwindSafe for TerminalManager
impl Send for TerminalManager
impl Sync for TerminalManager
impl Unpin for TerminalManager
impl UnwindSafe for TerminalManager
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> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter
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 more