pub struct UartConsole {
pub logfile: Option<File>,
pub timeout: Option<Duration>,
pub deadline: Option<Instant>,
pub exit_success: Option<Regex>,
pub exit_failure: Option<Regex>,
pub timestamp: bool,
pub buffer: String,
pub newline: bool,
pub break_en: bool,
}
Fields§
§logfile: Option<File>
§timeout: Option<Duration>
§deadline: Option<Instant>
§exit_success: Option<Regex>
§exit_failure: Option<Regex>
§timestamp: bool
§buffer: String
§newline: bool
§break_en: bool
Implementations§
Source§impl UartConsole
impl UartConsole
pub fn interact<T>(
&mut self,
device: &T,
stdin: Option<&mut dyn ReadAsFd>,
stdout: Option<&mut dyn Write>,
) -> Result<ExitStatus>where
T: ConsoleDevice + ?Sized,
pub fn captures(&self, status: ExitStatus) -> Option<Captures<'_>>
pub fn wait_for<T>(
device: &T,
rx: &str,
timeout: Duration,
) -> Result<Vec<String>>where
T: ConsoleDevice + ?Sized,
Trait Implementations§
Source§impl Default for UartConsole
impl Default for UartConsole
Source§fn default() -> UartConsole
fn default() -> UartConsole
Returns the “default value” for a type. Read more
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