pub struct SuccessionPlan { /* private fields */ }Expand description
Handles captain handoff when a room changes or captain becomes unavailable.
Implementations§
Source§impl SuccessionPlan
impl SuccessionPlan
pub fn new() -> Self
Sourcepub fn add_successor(&mut self, agent_id: &str)
pub fn add_successor(&mut self, agent_id: &str)
Add a successor to the plan.
Sourcepub fn promote_next(&mut self) -> Option<String>
pub fn promote_next(&mut self) -> Option<String>
Remove the current heir (e.g., they became captain) and promote the next.
Trait Implementations§
Source§impl Clone for SuccessionPlan
impl Clone for SuccessionPlan
Source§fn clone(&self) -> SuccessionPlan
fn clone(&self) -> SuccessionPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SuccessionPlan
impl RefUnwindSafe for SuccessionPlan
impl Send for SuccessionPlan
impl Sync for SuccessionPlan
impl Unpin for SuccessionPlan
impl UnsafeUnpin for SuccessionPlan
impl UnwindSafe for SuccessionPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more