Skip to main content

encoding_negotiator/
struct.rs

1use super::*;
2
3/// The rules that decide which encoding an answer carries.
4///
5/// The policy holds no server state, so the same rules can be used by any
6/// server that answers with a compressed body.
7#[derive(Clone, Debug, Getter)]
8pub struct CompressionPolicy {
9    /// The encodings that are offered, in the order they are preferred.
10    pub encodings: Vec<String>,
11    /// The smallest body that is worth compressing.
12    #[get(type(copy))]
13    pub min_size: usize,
14}