aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-11-09 07:26:27 -0800
committerZeyla Hellyer <[email protected]>2017-11-09 07:26:27 -0800
commitd5a9aa8b1e0a94094ef5bda98a76dd259a6e7a3a (patch)
tree50b739cf895a57f3e9d27dab809229c712d80fd5
parentFix Shard::shard_info doctest (diff)
downloadserenity-d5a9aa8b1e0a94094ef5bda98a76dd259a6e7a3a.tar.xz
serenity-d5a9aa8b1e0a94094ef5bda98a76dd259a6e7a3a.zip
Make ShardManager::runners public
`ShardManager::public` has been made public to allow direct user interaction, but should be used with caution due to the fact this can internally cause an invalid state when used improperly.
-rw-r--r--src/client/bridge/gateway/shard_manager.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/bridge/gateway/shard_manager.rs b/src/client/bridge/gateway/shard_manager.rs
index 2cf45fd..9e23d92 100644
--- a/src/client/bridge/gateway/shard_manager.rs
+++ b/src/client/bridge/gateway/shard_manager.rs
@@ -93,7 +93,11 @@ use framework::Framework;
#[derive(Debug)]
pub struct ShardManager {
/// The shard runners currently managed.
- runners: Arc<Mutex<HashMap<ShardId, ShardRunnerInfo>>>,
+ ///
+ /// **Note**: It is highly unrecommended to mutate this yourself unless you
+ /// need to. Instead prefer to use methods on this struct that are provided
+ /// where possible.
+ pub runners: Arc<Mutex<HashMap<ShardId, ShardRunnerInfo>>>,
/// The index of the first shard to initialize, 0-indexed.
shard_index: u64,
/// The number of shards to initialize.