titan_api_codec/lib.rs
1//! Utilities for encoding and decoding Titan API messages to and from their binary
2//! representations.
3//!
4//! The current v1 API encodes messages using [MessagePack], with optional compression on the
5//! binary encoding.
6//!
7//! # Features
8//!
9//! The following features control various compression methods:
10//!
11//! * `brotli` - (default) Enables [brotli] transforms for encoding and decoding.
12//! * `gzip` - (default) Enables [gzip] transforms for encoding and decoding.
13//! * `zstd` - (default) Enables [zstd] transforms for encoding and decoding.
14//!
15//! The following features control various encoding methods:
16//!
17//! * `messagepack` - (default) Enables [MessagePack] encoding and decoding.
18//!
19//! Additional features:
20//!
21//! * `enum-other` - (default) Enables `enum-other` feature on `titan-api-types` crate,
22//! allowing for handling of message types not defined in this version of the codec,
23//! e.g. for error handling.
24//!
25//! [MessagePack]: https://msgpack.org/index.html
26//! [brotli]: https://github.com/google/brotli
27//! [gzip]: https://www.gzip.org/
28//! [zstd]: https://github.com/facebook/zstd
29#![warn(missing_docs)]
30
31#[cfg(feature = "messagepack")]
32pub mod codec;
33pub mod dec;
34pub mod enc;
35pub mod transform;