pub struct PromptConfig {
pub pattern: Option<String>,
pub wait_for_prompt: bool,
pub timeout_ms: u64,
/* private fields */
}Expand description
Prompt configuration.
Fields§
§pattern: Option<String>Custom prompt pattern.
wait_for_prompt: boolWait for prompt after commands.
timeout_ms: u64Timeout for prompt detection.
Implementations§
Source§impl PromptConfig
impl PromptConfig
Sourcepub fn with_pattern(self, pattern: &str) -> Self
pub fn with_pattern(self, pattern: &str) -> Self
Set custom prompt pattern.
Sourcepub const fn with_timeout(self, timeout_ms: u64) -> Self
pub const fn with_timeout(self, timeout_ms: u64) -> Self
Set timeout.
Sourcepub fn find(&self, text: &str) -> Option<PromptInfo>
pub fn find(&self, text: &str) -> Option<PromptInfo>
Find prompt in text.
Trait Implementations§
Source§impl Clone for PromptConfig
impl Clone for PromptConfig
Source§fn clone(&self) -> PromptConfig
fn clone(&self) -> PromptConfig
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 PromptConfig
impl Debug for PromptConfig
Auto Trait Implementations§
impl Freeze for PromptConfig
impl RefUnwindSafe for PromptConfig
impl Send for PromptConfig
impl Sync for PromptConfig
impl Unpin for PromptConfig
impl UnwindSafe for PromptConfig
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