diff options
| author | Fuwn <[email protected]> | 2024-07-24 00:38:05 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-07-24 00:38:05 +0000 |
| commit | caeddebbb83e0ea0f495d1ce598f7daa288591e4 (patch) | |
| tree | 7c1cd50dc598f17f0a6b006c6ff8f858cf18b39c /src/response | |
| parent | chore: remove semi-outdated technical information (diff) | |
| download | september-caeddebbb83e0ea0f495d1ce598f7daa288591e4.tar.xz september-caeddebbb83e0ea0f495d1ce598f7daa288591e4.zip | |
refactor(response): move configuration into struct
Diffstat (limited to 'src/response')
| -rw-r--r-- | src/response/configuration.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/response/configuration.rs b/src/response/configuration.rs new file mode 100644 index 0000000..4278516 --- /dev/null +++ b/src/response/configuration.rs @@ -0,0 +1,23 @@ +pub struct Configuration { + is_proxy: bool, + is_raw: bool, + is_no_css: bool, +} + +impl Configuration { + pub const fn new() -> Self { + Self { is_proxy: false, is_raw: false, is_no_css: false } + } + + pub const fn is_proxy(&self) -> bool { self.is_proxy } + + pub const fn is_raw(&self) -> bool { self.is_raw } + + pub const fn is_no_css(&self) -> bool { self.is_no_css } + + pub fn set_proxy(&mut self, is_proxy: bool) { self.is_proxy = is_proxy; } + + pub fn set_raw(&mut self, is_raw: bool) { self.is_raw = is_raw; } + + pub fn set_no_css(&mut self, is_no_css: bool) { self.is_no_css = is_no_css; } +} |