This commit is contained in:
2026-03-04 01:50:14 +01:00
parent d7edd53792
commit 41c8303aa4
8 changed files with 1586 additions and 116 deletions
+21 -1
View File
@@ -1,8 +1,17 @@
use std::path::PathBuf;
use std::{num::NonZeroU64, path::PathBuf};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Deserialize, Serialize)]
pub enum Jobs {
Download(DownloadResponse),
Play(PlayResponse),
// Error(String),
}
pub type JobResult = Result<Jobs, String>;
#[derive(Serialize, Deserialize, Debug)]
pub struct JobResponse<T> {
pub content: Option<T>,
@@ -19,3 +28,14 @@ pub struct DownloadJob {
pub struct DownloadResponse {
pub path: PathBuf,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct PlayJob {
pub uuid: Uuid,
pub path: PathBuf,
pub guild_id: NonZeroU64,
pub channel_id: NonZeroU64,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct PlayResponse {}