aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/swarm
diff options
context:
space:
mode:
authorShayne Hartford <shaybox@shaybox.com>2023-02-27 00:18:02 -0500
committerGitHub <noreply@github.com>2023-02-26 23:18:02 -0600
commitadfbb97af815b8e626771a4a96a85d87220a485f (patch)
tree4fab7a8976c79c547855618c70e5c49b80779376 /azalea/src/swarm
parentcbc6af81fbdee71f4c1c7d62e1b91f8b17ad23bd (diff)
downloadazalea-drasl-adfbb97af815b8e626771a4a96a85d87220a485f.tar.xz
Add `set_state` and `set_swarm_state` (#76)
* Add set_state and set_swarm_state * Add [must_use], Remove set_state, and change state to swarm_state * Forgot the other must_use * I'm not good at this
Diffstat (limited to 'azalea/src/swarm')
-rw-r--r--azalea/src/swarm/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index 9edaa305..c0d9cb56 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -199,6 +199,12 @@ where
self.swarm_handler = Some(handler);
self
}
+ /// Set the swarm state instead of initializing defaults.
+ #[must_use]
+ pub fn set_swarm_state(mut self, swarm_state: SS) -> Self {
+ self.swarm_state = swarm_state;
+ self
+ }
/// Add a plugin to the swarm.
#[must_use]