[][src]Struct serial_unit_testing::serial::Serial

pub struct Serial { /* fields omitted */ }

Methods

impl Serial[src]

pub fn open(port_name: &str) -> Result<Serial, String>[src]

pub fn open_with_settings(
    port_name: &str,
    settings: &Settings
) -> Result<Serial, String>
[src]

pub fn write(&mut self, text: &str) -> Result<(), Error>[src]

pub fn write_format(
    &mut self,
    text: &str,
    text_format: &TextFormat
) -> Result<(), Error>
[src]

pub fn read<'a>(&'a mut self) -> Result<&'a [u8], Error>[src]

pub fn read_with_timeout<'a>(
    &'a mut self,
    timeout: Duration
) -> Result<&'a [u8], Error>
[src]

pub fn check(
    &mut self,
    text: &str,
    desired_response: &str
) -> Result<(bool, String), Error>
[src]

pub fn check_with_settings(
    &mut self,
    text: &str,
    desired_response: &str,
    settings: &CheckSettings
) -> Result<(bool, String), Error>
[src]

Auto Trait Implementations

impl Send for Serial

impl !Sync for Serial

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.