wip
This commit is contained in:
+21
-1
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user