diff --git a/src/types/entities/mod.rs b/src/types/entities/mod.rs index 8343628..8a06c35 100644 --- a/src/types/entities/mod.rs +++ b/src/types/entities/mod.rs @@ -23,6 +23,8 @@ pub use user_settings::*; pub use voice_state::*; pub use webhook::*; +use crate::gateway::Shared; + #[cfg(feature = "client")] use crate::gateway::Updateable; @@ -121,4 +123,11 @@ pub trait Composite { } vec } + + fn to_shared(self) -> Shared + where + Self: Sized, + { + Arc::new(RwLock::new(self)) + } }