Split some files and add more documentation
This commit is contained in:
parent
877722ed1b
commit
cd0242b796
8 changed files with 216 additions and 154 deletions
22
src/lib.rs
22
src/lib.rs
|
@ -1,10 +1,28 @@
|
|||
//! Crate for communicating with OBD-II (on-board diagnostics) interfaces on cars
|
||||
//!
|
||||
//! # Usage
|
||||
//! ```
|
||||
//! use obd2::{commands::Obd2DataRetrieval, device::Elm327, Obd2};
|
||||
//!
|
||||
//! fn main() -> Result<(), obd2::Error> {
|
||||
//! let mut device = Obd2::<Elm327>::default();
|
||||
//! println!("VIN: {}", device.get_vin()?);
|
||||
//! Ok(())
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
pub mod commands;
|
||||
|
||||
pub mod device;
|
||||
|
||||
mod error;
|
||||
pub use error::Error;
|
||||
use error::Result;
|
||||
|
||||
mod interface;
|
||||
pub use interface::Obd2;
|
||||
|
||||
mod obd2_device;
|
||||
use obd2_device::Result;
|
||||
pub use obd2_device::{Error, Obd2Device};
|
||||
pub use obd2_device::Obd2Device;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue