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 session;
38
39pub mod fields;
40
41pub mod decode;
42
43pub mod encode;
44
45pub mod types;
46
47pub mod tlvs;
48
49#[cfg(test)]
50pub(crate) mod tests;
51
52pub(crate) mod formatter;
53
54#[cfg(any(feature = "framez", feature = "tokio-codec"))]
55pub(crate) mod logging;
56
57#[cfg(feature = "framez")]
58#[cfg_attr(docsrs, doc(cfg(feature = "framez")))]
59pub mod framez;
60
61#[cfg(feature = "tokio-codec")]
62#[cfg_attr(docsrs, doc(cfg(feature = "tokio-codec")))]
63pub mod tokio_codec;