Trait embedded_serial::NonBlockingRx [] [src]

pub trait NonBlockingRx {
    type Error;
    fn getc_try(&mut self) -> Result<Option<u8>, Self::Error>;
}

Implementors of this trait offer octet based serial data reception using a non-blocking API, and requiring a mutable reference to self.

Associated Types

The error type returned if getc fails.

Required Methods

Attempt to read a single octet from the port's receiver; if the buffer is empty return None.

In some implementations, this can result in an Error. If not, use type Error = !.

If it times out, Ok(None) is returned. If it receives data, Ok(Some(data)) is returned. If it fails, Err(...) is returned.

Implementors