aboutsummaryrefslogtreecommitdiff
path: root/common/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-01-07 04:03:34 +0100
committermetamuffin <metamuffin@disroot.org>2026-01-07 04:03:34 +0100
commit7cc5fe5cd008072b99fc470b0ed730f7fa4e2881 (patch)
tree5ae0e65497528342d3b21dd343ace364a61fb82c /common/src/lib.rs
parentf932d4de439c6472d34ed4bbf530fca13b84d73a (diff)
downloadjellything-7cc5fe5cd008072b99fc470b0ed730f7fa4e2881.tar
jellything-7cc5fe5cd008072b99fc470b0ed730f7fa4e2881.tar.bz2
jellything-7cc5fe5cd008072b99fc470b0ed730f7fa4e2881.tar.zst
debug inpect impl
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r--common/src/lib.rs21
1 files changed, 2 insertions, 19 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 1359c73..2cbbfce 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -5,9 +5,9 @@
*/
#![feature(array_try_map)]
pub mod routes;
-use jellyobject::{Object, Registry, Tag, TagInfo, TypedTag};
+use jellyobject::{Object, Registry, Tag, enums, fields};
pub use jellystream_types as stream;
-use std::{any::TypeId, marker::PhantomData, sync::LazyLock};
+use std::sync::LazyLock;
pub use jellyobject;
@@ -18,23 +18,6 @@ pub static TAGREG: LazyLock<Registry> = LazyLock::new(|| {
reg
});
-macro_rules! fields {
- ($($id:ident: $type:ty = $tag:literal $name:literal;)*) => {
- $(pub const $id: TypedTag<$type> = TypedTag(Tag($tag), PhantomData);)*
- fn register_fields(reg: &mut Registry) {
- $(reg.add(Tag($tag), TagInfo { name: $name, r#type: Some(TypeId::of::<$type>()) });)*
- }
- };
-}
-macro_rules! enums {
- ($($id:ident = $tag:literal $name:literal;)*) => {
- $(pub const $id: Tag = Tag($tag);)*
- fn register_enums(reg: &mut Registry) {
- $(reg.add(Tag($tag), TagInfo { name: $name, r#type: None });)*
- }
- };
-}
-
fields! {
// Tag counter: 36