-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: [#589] versioning for configuration
- Loading branch information
1 parent
d7d6d88
commit 6c98e2b
Showing
11 changed files
with
330 additions
and
282 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/// Core configuration for the API | ||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] | ||
pub struct Api { | ||
/// The default page size for torrent lists. | ||
pub default_torrent_page_size: u8, | ||
/// The maximum page size for torrent lists. | ||
pub max_torrent_page_size: u8, | ||
} | ||
|
||
impl Default for Api { | ||
fn default() -> Self { | ||
Self { | ||
default_torrent_page_size: 10, | ||
max_torrent_page_size: 30, | ||
} | ||
} | ||
} |
Oops, something went wrong.