diff --git a/src/pubsub/event.rs b/src/pubsub/event.rs index dea11ba4..4ac75cf2 100644 --- a/src/pubsub/event.rs +++ b/src/pubsub/event.rs @@ -16,7 +16,7 @@ use ns; use data_forms::DataForm; -use pubsub::{NodeName, ItemId, SubscriptionId}; +use pubsub::{NodeName, ItemId, Subscription, SubscriptionId}; #[derive(Debug, Clone)] pub struct Item { @@ -58,13 +58,6 @@ impl From for Element { } } -generate_attribute!(Subscription, "subscription", { - None => "none", - Pending => "pending", - Subscribed => "subscribed", - Unconfigured => "unconfigured", -}, Default = None); - #[derive(Debug, Clone)] pub enum PubSubEvent { /* diff --git a/src/pubsub/mod.rs b/src/pubsub/mod.rs index 89b6f8ce..735fb9c6 100644 --- a/src/pubsub/mod.rs +++ b/src/pubsub/mod.rs @@ -11,3 +11,10 @@ pub use self::event::PubSubEvent; generate_id!(NodeName); generate_id!(ItemId); generate_id!(SubscriptionId); + +generate_attribute!(Subscription, "subscription", { + None => "none", + Pending => "pending", + Subscribed => "subscribed", + Unconfigured => "unconfigured", +}, Default = None);