-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split rust struct definitions into a separate file
- Loading branch information
1 parent
82b857b
commit 09a4108
Showing
3 changed files
with
72 additions
and
68 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,57 @@ | ||
use clap::{command, Parser}; | ||
use serde_repr::{Deserialize_repr, Serialize_repr}; | ||
|
||
#[derive(Parser, Debug)] | ||
#[command(version, about, long_about = None)] | ||
pub struct CommandLineArgs { | ||
/// UUID of the profile to launch | ||
#[arg(short, long)] | ||
pub launch: Option<String>, | ||
} | ||
|
||
#[derive(Clone, serde::Serialize)] | ||
pub struct ProgressPayload { | ||
pub state: String, | ||
pub total: u64, | ||
pub current: u64, | ||
} | ||
|
||
#[derive(Default, serde::Serialize, serde::Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ImportantDirs { | ||
pub yarc_folder: String, | ||
pub launcher_folder: String, | ||
pub temp_folder: String, | ||
} | ||
|
||
#[derive(Default, serde::Serialize, serde::Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct CustomDirs { | ||
pub yarg_folder: String, | ||
pub setlist_folder: String, | ||
} | ||
|
||
#[derive(Default, serde::Serialize, serde::Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ReleaseContent { | ||
pub name: String, | ||
pub platforms: Vec<String>, | ||
pub files: Vec<ReleaseContentFile>, | ||
} | ||
|
||
#[derive(Default, serde::Serialize, serde::Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ReleaseContentFile { | ||
pub url: String, | ||
pub file_type: String, | ||
pub signature: Option<String>, | ||
} | ||
|
||
#[derive(Serialize_repr, Deserialize_repr, PartialEq, Debug)] | ||
#[repr(u8)] | ||
pub enum ProfileFolderState { | ||
Error = 0, | ||
UpToDate = 1, | ||
UpdateRequired = 2, | ||
FirstDownload = 3, | ||
} |
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