pub struct ExpectState { /* private fields */ }Expand description
State machine for async expect operations.
Implementations§
Source§impl ExpectState
impl ExpectState
Sourcepub fn new(patterns: PatternSet, timeout: Duration) -> Self
pub fn new(patterns: PatternSet, timeout: Duration) -> Self
Create a new expect state.
Sourcepub fn is_timed_out(&self) -> bool
pub fn is_timed_out(&self) -> bool
Check if the operation has timed out.
Sourcepub fn remaining_time(&self) -> Duration
pub fn remaining_time(&self) -> Duration
Get the remaining time until timeout.
Sourcepub const fn patterns(&self) -> &PatternSet
pub const fn patterns(&self) -> &PatternSet
Get the patterns.
Sourcepub fn expects_eof(&self) -> bool
pub fn expects_eof(&self) -> bool
Check if the patterns include an EOF pattern.
Auto Trait Implementations§
impl Freeze for ExpectState
impl RefUnwindSafe for ExpectState
impl Send for ExpectState
impl Sync for ExpectState
impl Unpin for ExpectState
impl UnwindSafe for ExpectState
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