This commit is contained in:
Quaternions 2023-12-30 17:43:22 -08:00
parent 0a41d25270
commit d71d583d8f

@ -15,7 +15,7 @@ struct Cli {
#[derive(Subcommand)]
enum Commands{
Download(AssetIDList),
Upload{path:std::path::PathBuf,assetid:u64},
Upload{path:std::path::PathBuf,asset_id:u64},
}
#[derive(Args)]
@ -25,21 +25,21 @@ struct PathBufList {
#[derive(Args)]
struct AssetIDList{
assetids: Vec<AssetID>,
asset_ids:Vec<AssetID>,
}
fn main()->AResult<()>{
let cli=Cli::parse();
match cli.command{
Commands::Download(assetid_list)=>download_list(assetid_list.assetids),
Commands::Upload{path,assetid}=>upload_file(path,assetid),
Commands::Download(asset_id_list)=>download_list(asset_id_list.asset_ids).await,
Commands::Upload{path,asset_id}=>upload_file(path,asset_id),
}
}
fn upload_file(path:std::path::PathBuf,assetid:u64)->AResult<()>{
fn upload_file(path:std::path::PathBuf,asset_id:u64)->AResult<()>{
Ok(())
}
fn download_list(assetids:Vec<AssetID>)->AResult<()>{
async fn download_list(asset_ids:Vec<AssetID>)->AResult<()>{
Ok(())
}