pub struct AgentCompletionMap { /* private fields */ }Expand description
Frame-scoped map of agent completion handles.
Created by the scheduler at the top of each frame and inserted into
the per-frame ServiceRegistry overlay.
Agents must NOT retain a reference past the current frame.
Implementations§
Source§impl AgentCompletionMap
impl AgentCompletionMap
Sourcepub fn new(agent_ids: &[AgentId]) -> Self
pub fn new(agent_ids: &[AgentId]) -> Self
Builds a completion map with one empty handle per agent ID.
Sourcepub fn mark(&self, id: AgentId, outcome: CompletionOutcome) -> bool
pub fn mark(&self, id: AgentId, outcome: CompletionOutcome) -> bool
Marks an agent as having finished this frame with the given outcome.
Idempotent: subsequent calls for the same agent are no-ops.
Returns false if the agent ID is unknown to this map.
Sourcepub fn outcome(&self, id: AgentId) -> Option<CompletionOutcome>
pub fn outcome(&self, id: AgentId) -> Option<CompletionOutcome>
Returns the recorded outcome for id, or None if the agent has
not yet been marked (or the ID is unknown).
Sourcepub async fn wait(&self, id: AgentId) -> Option<CompletionOutcome>
pub async fn wait(&self, id: AgentId) -> Option<CompletionOutcome>
Awaits an agent’s completion. Returns the outcome, or None if the
agent ID is unknown to this map (signals a configuration bug rather
than blocking forever).
Auto Trait Implementations§
impl Freeze for AgentCompletionMap
impl RefUnwindSafe for AgentCompletionMap
impl Send for AgentCompletionMap
impl Sync for AgentCompletionMap
impl Unpin for AgentCompletionMap
impl UnsafeUnpin for AgentCompletionMap
impl UnwindSafe for AgentCompletionMap
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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