kafrust_protocol/lib.rs
1#![forbid(unsafe_code)]
2
3//! Kafka wire protocol support for kafrust.
4//!
5//! This crate is intentionally runtime-free. It owns Kafka request/response
6//! encoding and decoding so the public client can stay focused on user-facing
7//! producer and consumer behavior.
8
9pub mod api;
10pub mod codec;
11pub mod consumer_group;
12pub mod error;
13pub mod frame;
14pub mod header;
15
16pub use error::{Error, Result};
17
18/// Returns the protocol crate version compiled into this build.
19pub fn version() -> &'static str {
20 env!("CARGO_PKG_VERSION")
21}
22
23#[cfg(test)]
24mod tests {
25 #[test]
26 fn exposes_crate_version() {
27 assert_eq!(crate::version(), env!("CARGO_PKG_VERSION"));
28 }
29}