rusty_modbus_frame/lib.rs
1//! Modbus frame layer — bridges the `no_std` codec to tokio async.
2//!
3//! Implements `tokio_util::codec::Decoder`/`Encoder` for MBAP (TCP) and RTU framing.
4//! Houses CRC-16/Modbus computation and owned (`'static`) response types backed by `Bytes`.
5
6#![forbid(unsafe_code)]
7#![warn(missing_docs, clippy::all, clippy::pedantic)]
8
9pub mod crc;
10pub mod error;
11pub mod frame;
12pub mod mbap;
13pub mod owned;
14#[cfg(feature = "rtu")]
15pub mod rtu;
16#[cfg(feature = "rtu")]
17pub mod rtu_tcp;
18
19pub use crc::{crc16, verify_crc};
20pub use error::FrameError;
21pub use frame::{Frame, FrameHeader, RtuFrameMeta};
22pub use mbap::MbapCodec;
23pub use owned::{OwnedDeviceIdentification, OwnedResponsePdu};