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>>,
pub panic_recovery_strategy: PanicRecoveryStrategy,
pub resource_limits: ResourceLimits,
}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
panic_recovery_strategy: PanicRecoveryStrategyPanic recovery strategy for Model methods
resource_limits: ResourceLimitsResource limits for async task execution
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_panic_recovery(self, strategy: PanicRecoveryStrategy) -> Self
pub fn with_panic_recovery(self, strategy: PanicRecoveryStrategy) -> Self
Set panic recovery strategy for Model methods
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)
Sourcepub fn with_resource_limits(self, limits: ResourceLimits) -> Self
pub fn with_resource_limits(self, limits: ResourceLimits) -> Self
Set resource limits for async task execution
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