Add more doc comments

This commit is contained in:
Robert Sammelson 2023-05-17 22:42:45 -04:00
parent fb35987b28
commit 5b20ac0ab9
No known key found for this signature in database
GPG key ID: 92F1F04EDB06B9E9
6 changed files with 29 additions and 4 deletions

View file

@ -50,10 +50,15 @@ pub trait Obd2Reader {
/// Error type for low-level ODB-II communication issues
#[derive(thiserror::Error, Debug)]
pub enum Error {
/// An error with the underlying [FTDI device](ftdi::Device)
#[error("FTDI error: `{0:?}`")]
Ftdi(ftdi::Error),
/// An I/O error in a low-level [std::io] stream operation
#[error("IO error: `{0:?}`")]
IO(std::io::Error),
/// An OBD-II or interface device protocol error
#[error("Communication error: `{0}`")]
Communication(String),
}