From 315fe8e33b01ef894db248baea34d97f22f9d540 Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Sun, 21 Jan 2024 17:06:43 +0100 Subject: [PATCH] Define type alias `Shared` --- src/gateway/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gateway/mod.rs b/src/gateway/mod.rs index 076ed54..c5f415e 100644 --- a/src/gateway/mod.rs +++ b/src/gateway/mod.rs @@ -122,3 +122,11 @@ impl GatewayEvent { } } } + +/// A type alias for [`Arc>`], used to make the public facing API concerned with +/// Composite structs more ergonomic. +/// ## Note +/// +/// While `T` does not have to implement `Composite` to be used with `Shared`, +/// the primary use of `Shared` is with types that implement `Composite`. +pub type Shared = Arc>;