pub struct Relay { /* private fields */ }Implementations§
Source§impl Relay
impl Relay
pub fn new(roster_size: usize, max_rounds: usize) -> Self
pub fn strategy(&self) -> CollaborationStrategy
Sourcepub fn set_strategy(&mut self, strategy: CollaborationStrategy)
pub fn set_strategy(&mut self, strategy: CollaborationStrategy)
Change routing for future turns. This does not discard queued work or
alter the public context journal; it only affects the next automatic
recipient. Pair selection is re-derived from the next first value.
pub fn active_slots(&self) -> impl Iterator<Item = RosterSlot> + '_
pub fn pause(&mut self)
pub fn resume(&mut self)
pub fn tombstone(&mut self, slot: RosterSlot) -> Result<(), &'static str>
pub fn reactivate(&mut self, slot: RosterSlot) -> Result<(), &'static str>
pub fn drop_agent(&mut self, slot: RosterSlot) -> Result<(), &'static str>
Sourcepub fn promote_owner(&mut self, slot: RosterSlot) -> Result<(), &'static str>
pub fn promote_owner(&mut self, slot: RosterSlot) -> Result<(), &'static str>
Promote an active peer into the owner slot while preserving the causal relay state. The former owner remains in its original slot but is tombstoned, matching the Python coordinator’s stable-slot model.
Sourcepub fn swap_agents(
&mut self,
first: RosterSlot,
second: RosterSlot,
) -> Result<(), &'static str>
pub fn swap_agents( &mut self, first: RosterSlot, second: RosterSlot, ) -> Result<(), &'static str>
Exchange two live roster slots while preserving adapter identity in queued work, routing cursors, and per-agent context watermarks.
pub fn enqueue_human( &mut self, prompt: impl Into<String>, selected: Option<RosterSlot>, ) -> bool
pub fn enqueue_direct( &mut self, slot: RosterSlot, prompt: impl Into<String>, ) -> Result<bool, &'static str>
pub fn queued_count(&self) -> usize
pub fn record_public( &mut self, speaker: impl Into<String>, text: impl Into<String>, )
pub fn mark_context_seen(&mut self, slot: RosterSlot)
pub fn unseen_context(&mut self, slot: RosterSlot) -> String
pub fn add_agent(&mut self)
Sourcepub fn begin(
&mut self,
initial_prompt: impl Into<String>,
first: RosterSlot,
) -> RelayDecision
pub fn begin( &mut self, initial_prompt: impl Into<String>, first: RosterSlot, ) -> RelayDecision
Select the next causal turn. Direct work always precedes steering work.
Sourcepub fn finish(&mut self, slot: RosterSlot, direct: bool, accepted_stop: bool)
pub fn finish(&mut self, slot: RosterSlot, direct: bool, accepted_stop: bool)
Finalize a dispatched turn and choose the next ring position. Direct turns never become shared relay context.
Trait Implementations§
impl Eq for Relay
impl StructuralPartialEq for Relay
Auto Trait Implementations§
impl Freeze for Relay
impl RefUnwindSafe for Relay
impl Send for Relay
impl Sync for Relay
impl Unpin for Relay
impl UnsafeUnpin for Relay
impl UnwindSafe for Relay
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