udp/attribute/type.rs
1use crate::*;
2
3/// Type alias for thread-safe attribute storage.
4///
5/// This type is used to store arbitrary data that can be shared across
6/// different parts of the application in a thread-safe manner.
7pub type ThreadSafeAttributeStore = HashMap<String, Arc<dyn Any + Send + Sync>>;
8
9/// Type alias for types that implement Any + Send + Sync + Clone.
10///
11/// This is a trait alias for types that can be stored in the attribute store
12/// and safely shared across threads.
13pub trait AnySendSyncClone: Any + Send + Sync + Clone {}
14impl<T> AnySendSyncClone for T where T: Any + Send + Sync + Clone {}