-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(response): move configuration into struct
- Loading branch information
Showing
5 changed files
with
48 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters