aboutsummaryrefslogtreecommitdiff
path: root/common/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-29 18:03:06 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-29 18:03:06 +0100
commitdb511d3fe50f05329615f718515fab1b80d9e06a (patch)
tree7969fea01be100cbe4385ad13a14940a987ac513 /common/src/lib.rs
parent82e8a55a1496ae9132e13e7286fe1c0d57d586d3 (diff)
downloadjellything-db511d3fe50f05329615f718515fab1b80d9e06a.tar
jellything-db511d3fe50f05329615f718515fab1b80d9e06a.tar.bz2
jellything-db511d3fe50f05329615f718515fab1b80d9e06a.tar.zst
no direct redb access
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r--common/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index a72f345..05d1573 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -17,10 +17,15 @@ use bincode::{Decode, Encode};
use serde::{Deserialize, Serialize};
use std::{collections::BTreeMap, path::PathBuf};
+#[derive(
+ Clone, Copy, Debug, Serialize, Deserialize, Encode, Decode, PartialEq, Eq, PartialOrd, Ord,
+)]
+pub struct NodeID(pub [u8; 32]);
+
#[derive(Debug, Clone, Deserialize, Serialize, Default, Encode, Decode)]
pub struct Node {
pub slug: String,
- pub parents: Vec<String>,
+ pub parents: Vec<NodeID>,
pub kind: Option<NodeKind>,
pub poster: Option<Asset>,
pub backdrop: Option<Asset>,