commit 0872d2384aa3486fb38449467f951d8e19455cfc
parent f91c65f5b85bc9bada2306b4ac9e13ba6297379b
Author: triesap <tyson@radroots.org>
Date: Sat, 27 Jun 2026 08:17:15 +0000
events: derive dto events follow profile reaction social
Diffstat:
4 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/crates/events/src/dto.rs b/crates/events/src/dto.rs
@@ -701,31 +701,6 @@ impl Dto for RadrootsResourceHarvestCap {
}
}
-impl Dto for RadrootsReaction {
- fn describe(ctx: &mut DescribeCtx) -> TypeRef {
- let def = StructDef::new(
- "RadrootsReaction",
- "RadrootsReaction",
- span("crates/events/src/reaction.rs", 8),
- )
- .with_field(field(
- "root",
- "root",
- RadrootsNostrEventRef::describe(ctx),
- "crates/events/src/reaction.rs",
- 9,
- ))
- .with_field(field(
- "content",
- "content",
- String::describe(ctx),
- "crates/events/src/reaction.rs",
- 10,
- ));
- register(ctx, "RadrootsReaction", TypeDef::Struct(def))
- }
-}
-
impl Dto for RadrootsListingParseError {
fn describe(ctx: &mut DescribeCtx) -> TypeRef {
let def = EnumDef::new(
diff --git a/crates/events/src/follow.rs b/crates/events/src/follow.rs
@@ -2,6 +2,7 @@
use alloc::{string::String, vec::Vec};
#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
+#[cfg_attr(feature = "dto-bindgen", dto(export))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug)]
pub struct RadrootsFollow {
@@ -9,6 +10,7 @@ pub struct RadrootsFollow {
}
#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
+#[cfg_attr(feature = "dto-bindgen", dto(export))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug)]
pub struct RadrootsFollowProfile {
diff --git a/crates/events/src/profile.rs b/crates/events/src/profile.rs
@@ -9,6 +9,7 @@ pub const RADROOTS_PROFILE_TYPE_TAG_ANY: &str = "radroots:type:any";
pub const RADROOTS_PROFILE_TYPE_TAG_RADROOTSD: &str = "radroots:type:radrootsd";
#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
+#[cfg_attr(feature = "dto-bindgen", dto(export))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[derive(Clone, Debug, PartialEq, Eq, Copy)]
@@ -47,6 +48,7 @@ pub fn radroots_profile_type_from_tag_value(value: &str) -> Option<RadrootsProfi
}
#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
+#[cfg_attr(feature = "dto-bindgen", dto(export))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug)]
pub struct RadrootsProfile {
diff --git a/crates/events/src/reaction.rs b/crates/events/src/reaction.rs
@@ -4,6 +4,8 @@ use crate::social::RadrootsSocialTarget;
use alloc::string::String;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
+#[cfg_attr(feature = "dto-bindgen", dto(export))]
#[derive(Clone, Debug)]
pub struct RadrootsReaction {
pub target: RadrootsSocialTarget,