Trait embedded_serial::NonBlockingTx [] [src]

pub trait NonBlockingTx {
    type Error;
    fn putc_try(&mut self, ch: u8) -> Result<Option<()>, Self::Error>;

    fn puts_try(&mut self,
                data: &[u8])
                -> (usize, Result<Option<()>, Self::Error>) { ... } }

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

Associated Types

The error type returned if function fails.

Required Methods

Try and write a single octet to the port's transmitter. Will return Ok(None) if the FIFO/buffer was full and the character couldn't be stored or Ok(Some(())) if it was stored OK.

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

Provided Methods

Write as much of a complete string to the UART as possible. Returns the number of octets sent, plus the result from the last putc_try call. Aborts early if putc_try fails in any way.

Implementors