pub struct UartConsole { /* private fields */ }Implementations§
Source§impl UartConsole
impl UartConsole
pub fn new( timeout: Option<Duration>, exit_success: Option<Regex>, exit_failure: Option<Regex>, ) -> Self
pub fn interact<T>(&mut self, device: &T, quiet: bool) -> Result<ExitStatus>where
T: ConsoleDevice + ?Sized,
pub async fn interact_async<T>(
&mut self,
device: &T,
quiet: bool,
) -> Result<ExitStatus>where
T: ConsoleDevice + ?Sized,
pub fn captures(&self, status: ExitStatus) -> Option<Captures<'_>>
Sourcepub fn wait_for_bytes<T>(
device: &T,
rx: &str,
timeout: Duration,
) -> Result<Vec<String>>where
T: ConsoleDevice + ?Sized,
pub fn wait_for_bytes<T>(
device: &T,
rx: &str,
timeout: Duration,
) -> Result<Vec<String>>where
T: ConsoleDevice + ?Sized,
Wait on the console until the regex matches the input.
The input is processed one byte at a time, and is accumulated until match happens.
Auto Trait Implementations§
impl Freeze for UartConsole
impl RefUnwindSafe for UartConsole
impl Send for UartConsole
impl Sync for UartConsole
impl Unpin for UartConsole
impl UnwindSafe for UartConsole
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