Skip to main content

trillium_static/
options.rs

1#[derive(Debug, Clone, Copy)]
2pub struct StaticOptions {
3    pub(crate) etag: bool,
4    pub(crate) modified: bool,
5}
6
7impl StaticOptions {
8    pub fn without_etag(mut self) -> Self {
9        self.etag = false;
10        self
11    }
12
13    pub fn without_modified(mut self) -> Self {
14        self.modified = false;
15        self
16    }
17}
18
19impl Default for StaticOptions {
20    fn default() -> Self {
21        Self {
22            etag: true,
23            modified: true,
24        }
25    }
26}