Skip to main content

mbus_kit/
lib.rs

1#![no_std]
2#![forbid(unsafe_code)]
3#![deny(missing_docs)]
4// Every byte this crate reads comes from a meter, a bus or a radio before anything about
5// it is known, so the ways a decoder can abort the process are denied outright.
6#![deny(
7    clippy::panic,
8    clippy::unwrap_used,
9    clippy::expect_used,
10    clippy::todo,
11    clippy::unimplemented,
12    clippy::indexing_slicing,
13    clippy::exit
14)]
15#![warn(clippy::pedantic)]
16#![cfg_attr(test, allow(clippy::unwrap_used, clippy::panic, clippy::expect_used, clippy::indexing_slicing))]
17// Destructuring wire bytes into `[a, b, c, …]` is the clearest form for a protocol crate.
18#![allow(
19    clippy::module_name_repetitions,
20    clippy::must_use_candidate,
21    clippy::missing_errors_doc,
22    clippy::many_single_char_names
23)]
24#![cfg_attr(docsrs, feature(doc_cfg))]
25#![doc = include_str!("../README.md")]
26
27#[cfg(feature = "std")]
28extern crate std;
29
30pub mod app;
31pub mod compact;
32pub mod crc;
33mod error;
34pub mod fragment;
35pub mod json;
36pub mod master;
37#[cfg(feature = "oms")]
38#[cfg_attr(docsrs, doc(cfg(feature = "oms")))]
39pub mod oms;
40pub mod profile;
41pub mod record;
42#[cfg(feature = "std")]
43#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
44pub mod serial;
45pub mod stick;
46mod time;
47mod value;
48pub mod vif;
49pub mod wired;
50pub mod wireless;
51
52pub use app::{
53    Address, Application, Body, Header, LongHeader, Manufacturer, Medium, SecurityMode, ShortHeader,
54};
55pub use error::{Check, Error, Result};
56pub use record::{DataField, Dib, Function, Record, Records};
57pub use time::{Date, DateTime, Time};
58pub use value::{Quantity, Unit, Value};
59pub use vif::{Description, Kind, Modifier, Vib};