Add documentation for into_shared
This commit is contained in:
parent
ca58767372
commit
57214fd2fe
|
@ -124,6 +124,12 @@ pub trait Composite<T: Updateable + Clone + Debug> {
|
|||
vec
|
||||
}
|
||||
|
||||
/// Uses [`Shared`] to provide an ergonomic alternative to `Arc::new(RwLock::new(obj))`.
|
||||
///
|
||||
/// [`Shared<Self>`] can then be observed using the [`Gateway`], turning the underlying
|
||||
/// `dyn Composite<Self>` 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<Self>
|
||||
where
|
||||
Self: Sized,
|
||||
|
|
Loading…
Reference in New Issue