# Read in embedded_hal::serial - Rust
Read half of a serial interface
Keywords: rust, rustlang, rust-lang, Read

# Trait embedded_hal::serial::Read

source · [−]

    pub trait Read<Word> {
        type Error;
        fn try_read(&mut self) -> Result<Word, Self::Error>;
    }

Expand description

Read half of a serial interface

Some serial interfaces support different data sizes (8 bits, 9 bits, etc.); This can be encoded in this trait via the `Word` type parameter.

## Associated Types

source

#### type Error

Read error

## Required methods

source

#### fn try_read(&mut self) -> Result<Word, Self::Error>

Reads a single word from the serial interface

## Implementors