folders structure
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "types"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.228" }
|
||||
uuid = { version = "1.21.0", features = ["serde", "v4"] }
|
||||
@@ -0,0 +1,19 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub enum JobKind {
|
||||
Download,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct InnerStruct {
|
||||
pub str: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Job {
|
||||
pub uuid: Uuid,
|
||||
pub kind: JobKind,
|
||||
pub inner: InnerStruct,
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
pub mod jobs;
|
||||
pub mod misc;
|
||||
@@ -0,0 +1,5 @@
|
||||
use uuid::Uuid;
|
||||
|
||||
pub fn new_uuid_v4() -> Uuid {
|
||||
Uuid::new_v4()
|
||||
}
|
||||
Reference in New Issue
Block a user