diff --git a/src/types/entities/mod.rs b/src/types/entities/mod.rs index 3f075ce..7c914b1 100644 --- a/src/types/entities/mod.rs +++ b/src/types/entities/mod.rs @@ -124,6 +124,12 @@ pub trait Composite { vec } + /// Uses [`Shared`] to provide an ergonomic alternative to `Arc::new(RwLock::new(obj))`. + /// + /// [`Shared`] can then be observed using the [`Gateway`], turning the underlying + /// `dyn Composite` into a self-updating struct, which is a tracked variant of a chorus + /// entity struct, updating its' held information when new information concerning itself arrives + /// over the [`Gateway`] connection, reducing the need for expensive network-API calls. fn into_shared(self) -> Shared where Self: Sized,