diff options
author | metamuffin <metamuffin@disroot.org> | 2025-02-07 14:08:20 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-02-07 14:08:20 +0100 |
commit | 346095d20e3d817d150cbea49e87a49fbcaa2304 (patch) | |
tree | 1fc3868fa68287e916e511c8f5b43b62087f0ff9 /common/src/lib.rs | |
parent | 976bdd8e2d14049c766a654a7575f9f5109c7395 (diff) | |
download | jellything-346095d20e3d817d150cbea49e87a49fbcaa2304.tar jellything-346095d20e3d817d150cbea49e87a49fbcaa2304.tar.bz2 jellything-346095d20e3d817d150cbea49e87a49fbcaa2304.tar.zst |
nodeid guard
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r-- | common/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs index 74476fe..43adfba 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -3,6 +3,7 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2025 metamuffin <metamuffin.org> */ +#![feature(array_try_map)] pub mod api; pub mod config; pub mod helpers; @@ -26,6 +27,11 @@ use std::{ )] pub struct NodeID(pub [u8; 32]); +pub enum NodeIDOrSlug { + ID(NodeID), + Slug(String), +} + #[derive(Debug, Clone, Deserialize, Serialize, Default, Encode, Decode)] pub struct Node { #[serde(default)] |