summaryrefslogtreecommitdiff
path: root/src/types.rs
diff options
context:
space:
mode:
authorjakka <jakka@jakka.su>2025-10-01 00:25:24 +0300
committerjakka <jakka@jakka.su>2025-10-01 00:25:24 +0300
commitc177ba7a49caf63582719a4086e5032e2c939cfa (patch)
treeb922d01ef0061137f79101ff1de513ba402fbfa2 /src/types.rs
parent6b0a6c0ca36c181d55c78a5dca46f1890c9cce38 (diff)
reconfigured the library, moved async client and trait to their own module. in the future sync and async implementations will be separated
Diffstat (limited to 'src/types.rs')
-rw-r--r--src/types.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/types.rs b/src/types.rs
index df2c387..7762065 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -226,3 +226,24 @@ pub struct HashResponse {
#[serde(default)]
pub pixel_hash: Option<String>,
}
+
+#[derive(Debug, Deserialize_repr)]
+#[repr(u8)]
+pub enum UrlStatus {
+ NotInDatabase = 0,
+ AlreadyInDatabase = 2,
+ PreviouslyDeleted,
+}
+
+#[derive(Debug, Deserialize)]
+pub struct UrlFileStatus {
+ pub status: UrlStatus,
+ pub hash: String,
+ pub note: String,
+}
+
+#[derive(Debug, Deserialize)]
+pub struct FilesUrlResponse {
+ pub normalised_url: String,
+ pub url_file_statuses: Vec<UrlFileStatus>,
+}