From 346095d20e3d817d150cbea49e87a49fbcaa2304 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 7 Feb 2025 14:08:20 +0100 Subject: nodeid guard --- common/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/src/lib.rs') 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 */ +#![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)] -- cgit v1.2.3-70-g09d2