http_type/any/trait.rs
1use crate::*;
2
3/// Represents a type that can be dynamically downcast and is safe to send across threads.
4///
5/// This trait combines the capabilities of `Any` and `Send`, ensuring that types implementing
6/// it can be safely sent across thread boundaries.
7pub trait AnySend: Any + Send {}
8
9/// Represents a type that can be dynamically downcast, is safe to send across threads, and can be cloned.
10///
11/// This trait combines the capabilities of `Any`, `Send`, and `Clone`, ensuring that types implementing
12/// it can be safely sent across thread boundaries and can be cloned.
13pub trait AnySendClone: Any + Send + Clone {}
14
15/// Represents a type that can be dynamically downcast and is safe to share across threads.
16///
17/// This trait combines the capabilities of `Any` and `Sync`, ensuring that types implementing
18/// it can be safely shared across thread boundaries.
19pub trait AnySync: Any + Sync {}
20
21/// Represents a type that can be dynamically downcast, is safe to share across threads, and can be cloned.
22///
23/// This trait combines the capabilities of `Any`, `Sync`, and `Clone`, ensuring that types implementing
24/// it can be safely shared across thread boundaries and can be cloned.
25pub trait AnySyncClone: Any + Sync + Clone {}
26
27/// Represents a type that can be dynamically downcast and is safe to both send and share across threads.
28///
29/// This trait combines the capabilities of `Any`, `Send`, and `Sync`, ensuring that types implementing
30/// it can be safely sent and shared across thread boundaries.
31pub trait AnySendSync: Any + Send + Sync {}
32
33/// Represents a type that can be dynamically downcast, is safe to both send and share across threads, and can be cloned.
34///
35/// This trait combines the capabilities of `Any`, `Send`, `Sync`, and `Clone`, ensuring that types implementing
36/// it can be safely sent and shared across thread boundaries and can be cloned.
37pub trait AnySendSyncClone: Any + Send + Sync + Clone {}