kafka/compression/
mod.rs

1#[cfg(feature = "gzip")]
2pub mod gzip;
3
4#[cfg(feature = "snappy")]
5pub mod snappy;
6
7/// Compression types supported by kafka. The numeral values of this
8/// enumeration correspond to the compression encoding in the
9/// attributes of a Message in the protocol.
10#[derive(Debug, Copy, Clone)]
11pub enum Compression {
12    NONE = 0,
13    #[cfg(feature = "gzip")]
14    GZIP = 1,
15    #[cfg(feature = "snappy")]
16    SNAPPY = 2,
17}
18
19impl Default for Compression {
20    fn default() -> Self {
21        Compression::NONE
22    }
23}