ic_bn_lib_common/traits/pubsub.rs
1use std::hash::Hash;
2
3/// Trait that a topic ID should implement
4pub trait TopicId: Hash + Eq + Clone + Send + Sync + 'static {}
5impl<T: Hash + Eq + Clone + Send + Sync + 'static> TopicId for T {}
6
7/// Trait that a message should implement
8pub trait Message: Clone + Send + Sync + 'static {}
9impl<T: Clone + Send + Sync + 'static> Message for T {}