Trait embedded_serial::ImmutNonBlockingTx [] [src]

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

    fn puts_try<I: ?Sized>(
        &self,
        data: &I
    ) -> Result<usize, (usize, Self::Error)>
    where
        I: AsRef<[u8]>
, { ... } }

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 octet couldn't be stored or Ok(Some(ch)) 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 call. Aborts early if putc fails in any way.

Implementors