pub struct ProgramOptions {
pub alt_screen: bool,
pub mouse_mode: MouseMode,
pub bracketed_paste: bool,
pub focus_reporting: bool,
pub fps: u16,
pub headless: bool,
pub install_signal_handler: bool,
pub without_renderer: bool,
pub output: Option<Box<dyn Write + Send + Sync>>,
pub input: Option<Box<dyn Read + Send + Sync>>,
}Expand description
Options for configuring the program
Fields§
§alt_screen: boolWhether to use alternate screen
mouse_mode: MouseModeMouse tracking mode
bracketed_paste: boolEnable bracketed paste mode
focus_reporting: boolEnable focus reporting
fps: u16Frames per second (0 = unlimited)
headless: boolRun in headless mode without rendering
install_signal_handler: boolDisable signal handlers
without_renderer: boolDisable renderer
output: Option<Box<dyn Write + Send + Sync>>Custom output writer
input: Option<Box<dyn Read + Send + Sync>>Custom input reader
Implementations§
Source§impl ProgramOptions
impl ProgramOptions
Sourcepub fn with_alt_screen(self, enable: bool) -> Self
pub fn with_alt_screen(self, enable: bool) -> Self
Enable or disable alternate screen
Sourcepub fn with_mouse_mode(self, mode: MouseMode) -> Self
pub fn with_mouse_mode(self, mode: MouseMode) -> Self
Set mouse tracking mode
Sourcepub fn with_bracketed_paste(self, enable: bool) -> Self
pub fn with_bracketed_paste(self, enable: bool) -> Self
Enable bracketed paste mode
Sourcepub fn with_focus_reporting(self, enable: bool) -> Self
pub fn with_focus_reporting(self, enable: bool) -> Self
Enable focus reporting
Sourcepub fn without_signal_handler(self) -> Self
pub fn without_signal_handler(self) -> Self
Disable signal handlers
Sourcepub fn without_renderer(self) -> Self
pub fn without_renderer(self) -> Self
Disable renderer
Sourcepub fn with_input_string(self, input: &str) -> Self
pub fn with_input_string(self, input: &str) -> Self
Set input from a string (convenience method for testing)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProgramOptions
impl !RefUnwindSafe for ProgramOptions
impl Send for ProgramOptions
impl Sync for ProgramOptions
impl Unpin for ProgramOptions
impl !UnwindSafe for ProgramOptions
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