http_type/any/type.rs
1use crate::*;
2
3/// A type alias for a boxed `Any` trait object.
4///
5/// This represents a dynamically dispatched trait object that owns its data.
6pub type BoxAny = Box<dyn Any>;
7/// An optional `BoxAny`.
8pub type OptionBoxAny = Option<BoxAny>;
9/// A type alias for an `Rc` wrapped `Any` trait object.
10///
11/// This represents a reference-counted trait object that can be shared across threads.
12pub type RcAny = Rc<dyn Any>;
13/// An optional `RcAny`.
14pub type OptionRcAny = Option<RcAny>;
15/// A type alias for an `Arc` wrapped `Any` trait object.
16///
17/// This represents an atomically reference-counted trait object that can be shared across threads.
18pub type ArcAny = Arc<dyn Any>;
19/// An optional `ArcAny`.
20pub type OptionArcAny = Option<ArcAny>;
21/// A type alias for a boxed `Any + Send` trait object.
22///
23/// This represents a dynamically dispatched trait object that owns its data and is safe to send across threads.
24pub type BoxAnySend = Box<dyn Any + Send>;
25/// An optional `BoxAnySend`.
26pub type OptionBoxAnySend = Option<BoxAnySend>;
27/// A type alias for an `Rc` wrapped `Any + Send` trait object.
28///
29/// This represents a reference-counted trait object that can be shared across threads and is safe to send.
30pub type RcAnySend = Rc<dyn Any + Send>;
31/// An optional `RcAnySend`.
32pub type OptionRcAnySend = Option<RcAnySend>;
33/// A type alias for an `Arc` wrapped `Any + Send` trait object.
34///
35/// This represents an atomically reference-counted trait object that can be shared across threads and is safe to send.
36pub type ArcAnySend = Arc<dyn Any + Send>;
37/// An optional `ArcAnySend`.
38pub type OptionArcAnySend = Option<ArcAnySend>;
39/// A type alias for a boxed `Any + Sync` trait object.
40///
41/// This represents a dynamically dispatched trait object that owns its data and is safe to share across threads.
42pub type BoxAnySync = Box<dyn Any + Sync>;
43/// An optional `BoxAnySync`.
44pub type OptionBoxAnySync = Option<BoxAnySync>;
45/// A type alias for an `Rc` wrapped `Any + Sync` trait object.
46///
47/// This represents a reference-counted trait object that can be shared across threads and is safe to share.
48pub type RcAnySync = Rc<dyn Any + Sync>;
49/// An optional `RcAnySync`.
50pub type OptionRcAnySync = Option<RcAnySync>;
51/// A type alias for an `Arc` wrapped `Any + Sync` trait object.
52///
53/// This represents an atomically reference-counted trait object that can be shared across threads and is safe to share.
54pub type ArcAnySync = Arc<dyn Any + Sync>;
55/// An optional `ArcAnySync`.
56pub type OptionArcAnySync = Option<ArcAnySync>;
57/// A type alias for a boxed `Any + Send + Sync` trait object.
58///
59/// This represents a dynamically dispatched trait object that owns its data and is safe to send and share across threads.
60pub type BoxAnySendSync = Box<dyn Any + Send + Sync>;
61/// An optional `BoxAnySendSync`.
62pub type OptionBoxAnySendSync = Option<BoxAnySendSync>;
63/// A type alias for an `Rc` wrapped `Any + Send + Sync` trait object.
64///
65/// This represents a reference-counted trait object that can be shared across threads and is safe to send and share.
66pub type RcAnySendSync = Rc<dyn Any + Send + Sync>;
67/// An optional `RcAnySendSync`.
68pub type OptionRcAnySendSync = Option<RcAnySendSync>;
69/// A type alias for an `Arc` wrapped `Any + Send + Sync` trait object.
70///
71/// This represents an atomically reference-counted trait object that can be shared across threads and is safe to send and share.
72pub type ArcAnySendSync = Arc<dyn Any + Send + Sync>;
73/// An optional `ArcAnySendSync`.
74pub type OptionArcAnySendSync = Option<ArcAnySendSync>;