pub struct InteractConfig {
pub escape_char: Option<char>,
pub idle_timeout: Option<Duration>,
pub echo: bool,
pub output_hooks: Vec<InteractHook>,
pub input_hooks: Vec<InteractHook>,
}Expand description
Configuration for interact mode.
Fields§
§escape_char: Option<char>Escape character to exit interact mode.
idle_timeout: Option<Duration>Timeout for idle detection.
echo: boolWhether to echo input.
output_hooks: Vec<InteractHook>Output hooks.
input_hooks: Vec<InteractHook>Input hooks.
Implementations§
Source§impl InteractConfig
impl InteractConfig
Sourcepub const fn escape_char(self, c: char) -> Self
pub const fn escape_char(self, c: char) -> Self
Set the escape character.
Sourcepub const fn idle_timeout(self, timeout: Duration) -> Self
pub const fn idle_timeout(self, timeout: Duration) -> Self
Set the idle timeout.
Trait Implementations§
Source§impl Clone for InteractConfig
impl Clone for InteractConfig
Source§fn clone(&self) -> InteractConfig
fn clone(&self) -> InteractConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InteractConfig
impl Debug for InteractConfig
Auto Trait Implementations§
impl Freeze for InteractConfig
impl RefUnwindSafe for InteractConfig
impl Send for InteractConfig
impl Sync for InteractConfig
impl Unpin for InteractConfig
impl UnwindSafe for InteractConfig
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