divecomputer_core/lib.rs
1//! Shared building blocks for dive computer protocols.
2//!
3//! This crate holds everything that more than one protocol family needs, so that it
4//! exists exactly once: checksums, framing codecs, the error type, the transport traits
5//! protocols are written against, and the dive data model. It is `no_std` and has no
6//! platform or runtime dependencies, so it runs natively, on embedded targets and in
7//! WebAssembly.
8//!
9//! The behaviour implemented here is specified in the
10//! [Dive Computer Protocols](https://michidk.github.io/divecomputer-rs/) documentation.
11
12#![no_std]
13
14extern crate alloc;
15
16pub mod checksum;
17pub mod dive;
18mod error;
19pub mod slip;
20pub mod transport;
21pub mod units;
22
23pub use error::{Error, Result};
24
25// Compile and run the examples in the crate README as doctests.
26#[cfg(doctest)]
27#[doc = include_str!("../README.md")]
28struct ReadmeDoctests;