pub enum ExpectResult {
Matched(Match),
Eof {
buffer: String,
},
Timeout {
duration: Duration,
buffer: String,
},
}Expand description
Result of an expect operation with multiple patterns.
Variants§
Implementations§
Source§impl ExpectResult
impl ExpectResult
Sourcepub const fn is_timeout(&self) -> bool
pub const fn is_timeout(&self) -> bool
Check if this is a timeout.
Sourcepub fn into_match(self) -> Option<Match>
pub fn into_match(self) -> Option<Match>
Get the match if this is a successful match.
Trait Implementations§
Source§impl Clone for ExpectResult
impl Clone for ExpectResult
Source§fn clone(&self) -> ExpectResult
fn clone(&self) -> ExpectResult
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 moreAuto Trait Implementations§
impl Freeze for ExpectResult
impl RefUnwindSafe for ExpectResult
impl Send for ExpectResult
impl Sync for ExpectResult
impl Unpin for ExpectResult
impl UnwindSafe for ExpectResult
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