rusmpp_core/
lib.rs

1#![no_std]
2#![forbid(unsafe_code)]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![deny(missing_debug_implementations)]
5
6//! ## Features
7//!
8//! - `alloc`:  Enables the `alloc` crate.
9//! - `verbose`: Enables verbose error reports. Enables the `alloc` feature.
10//! - `arbitrary`: Implements [`Arbitrary`](https://docs.rs/arbitrary/latest/arbitrary/trait.Arbitrary.html) trait for all SMPP types.
11//! - `serde`: Implements [`Serialize`](https://docs.rs/serde/latest/serde/trait.Serialize.html) trait for all SMPP types.
12//! - `serde-deserialize-unchecked`: Implements [`Deserialize`](https://docs.rs/serde/latest/serde/trait.Deserialize.html) trait for owned SMPP types, but does not check the validity of the data. Use with caution.
13//! - `tokio-codec`: Implements [`tokio-util`](https://docs.rs/tokio-util/latest/tokio_util/index.html) [`Encoder`](https://docs.rs/tokio-util/latest/tokio_util/codec/trait.Encoder.html) and [`Decoder`](https://docs.rs/tokio-util/latest/tokio_util/codec/trait.Decoder.html) traits.
14//! - `framez`: Implements [`framez`](https://docs.rs/framez/latest/framez/index.html) [`Encoder`](https://docs.rs/framez/latest/framez/encode/trait.Encoder.html) and [`Decoder`](https://docs.rs/framez/latest/framez/decode/trait.Decoder.html) traits.
15//! - `tracing`: Enables logging using [`tracing`](https://docs.rs/tracing/latest/tracing/).
16//! - `pretty-hex-fmt`: Logs byte slices like `[0x00, 0x00, 0x00, 0x6F]` instead of `[00, 00, 00, 6F]`, if `tracing` feature is enabled.
17//! - `char-fmt`: Logs byte slices as characters, if `tracing` feature is enabled.
18
19#[cfg(any(test, feature = "alloc"))]
20extern crate alloc;
21
22#[cfg(any(test, feature = "arbitrary", feature = "tokio-codec"))]
23extern crate std;
24
25pub mod pdus;
26
27pub mod values;
28
29mod command_id;
30pub use command_id::CommandId;
31
32mod command_status;
33pub use command_status::CommandStatus;
34
35pub mod command;
36
37pub mod fields;
38
39pub mod decode;
40
41pub mod encode;
42
43pub mod types;
44
45pub mod tlvs;
46
47#[cfg(test)]
48pub(crate) mod tests;
49
50pub(crate) mod formatter;
51
52#[cfg(any(feature = "framez", feature = "tokio-codec"))]
53pub(crate) mod logging;
54
55#[cfg(feature = "framez")]
56#[cfg_attr(docsrs, doc(cfg(feature = "framez")))]
57pub mod framez;
58
59#[cfg(feature = "tokio-codec")]
60#[cfg_attr(docsrs, doc(cfg(feature = "tokio-codec")))]
61pub mod tokio_codec;