[THRIFT-5871] Add message / container size checking for Rust
Bring the Rust implementation somewhat up to par with the other implementations.
I tried 4-5 different ways to get the "perfect" check but since trait specialization is not yet stable,
I was not able to arrive at a solution I'm happy with (code was either ugly, or had runtime overhead).
So for now, we avoid full message size tracking / more precise limit checking, but this is a strong step
in the right direction.
diff --git a/lib/rs/src/lib.rs b/lib/rs/src/lib.rs
index 2f60188..d3804ec 100644
--- a/lib/rs/src/lib.rs
+++ b/lib/rs/src/lib.rs
@@ -21,10 +21,11 @@
//! Thrift server and client. It is divided into the following modules:
//!
//! 1. errors
-//! 2. protocol
-//! 3. transport
-//! 4. server
-//! 5. autogen
+//! 2. configuration
+//! 3. protocol
+//! 4. transport
+//! 5. server
+//! 6. autogen
//!
//! The modules are layered as shown in the diagram below. The `autogen'd`
//! layer is generated by the Thrift compiler's Rust plugin. It uses the
@@ -82,6 +83,9 @@
mod autogen;
pub use crate::autogen::*;
+mod configuration;
+pub use crate::configuration::*;
+
/// Result type returned by all runtime library functions.
///
/// As is convention this is a typedef of `std::result::Result`