pub struct LifecycleGuard { /* private fields */ }Expand description
Tracks the turn and item lifecycle of one event stream.
Implementations§
Source§impl LifecycleGuard
impl LifecycleGuard
pub fn new(policy: RepairPolicy) -> Self
Sourcepub fn turn_is_open(&self) -> bool
pub fn turn_is_open(&self) -> bool
Whether the guard is currently inside a turn.
Sourcepub fn admit(&mut self, event: ThreadEvent) -> Admission
pub fn admit(&mut self, event: ThreadEvent) -> Admission
Admit one event, returning what to emit and what was violated.
Trait Implementations§
Source§impl Debug for LifecycleGuard
impl Debug for LifecycleGuard
Auto Trait Implementations§
impl Forget for LifecycleGuard
impl Freeze for LifecycleGuardwhere
*const u8 is !null: Freeze,
PhantomData<ThreadItem>: Freeze,
PhantomData<(String, ())>: Freeze,
PhantomData<String>: Freeze,
impl Move for LifecycleGuard
impl RefUnwindSafe for LifecycleGuard
impl Send for LifecycleGuardwhere
RawVecInner: Send,
BoxRaw<ItemContext>: Send,
BoxRaw<ReasoningItem>: Send,
BoxRaw<DecisionItem>: Send,
BoxRaw<CommandExecutionItem>: Send,
BoxRaw<ToolInvocationItem>: Send,
BoxRaw<ToolOutputItem>: Send,
BoxRaw<FileChangeItem>: Send,
BoxRaw<McpToolCallItem>: Send,
BoxRaw<WebSearchItem>: Send,
BoxRaw<HarnessEventItem>: Send,
RawTable<(String, ())>: Send,
impl Sync for LifecycleGuardwhere
RawVecInner: Sync,
BoxRaw<ItemContext>: Sync,
BoxRaw<ReasoningItem>: Sync,
BoxRaw<DecisionItem>: Sync,
BoxRaw<CommandExecutionItem>: Sync,
BoxRaw<ToolInvocationItem>: Sync,
BoxRaw<ToolOutputItem>: Sync,
BoxRaw<FileChangeItem>: Sync,
BoxRaw<McpToolCallItem>: Sync,
BoxRaw<WebSearchItem>: Sync,
BoxRaw<HarnessEventItem>: Sync,
RawTable<(String, ())>: Sync,
impl Unpin for LifecycleGuardwhere
*const u8 is !null: Unpin,
Box<ItemContext>: Unpin,
Box<ReasoningItem>: Unpin,
Box<DecisionItem>: Unpin,
Box<CommandExecutionItem>: Unpin,
Box<ToolInvocationItem>: Unpin,
Box<ToolOutputItem>: Unpin,
Box<FileChangeItem>: Unpin,
Box<McpToolCallItem>: Unpin,
Box<WebSearchItem>: Unpin,
Box<HarnessEventItem>: Unpin,
impl UnsafeUnpin for LifecycleGuardwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ThreadItem>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for LifecycleGuardwhere
RawVecInner: UnwindSafe,
BoxRaw<ItemContext>: UnwindSafe,
BoxRaw<ReasoningItem>: UnwindSafe,
BoxRaw<DecisionItem>: UnwindSafe,
BoxRaw<CommandExecutionItem>: UnwindSafe,
BoxRaw<ToolInvocationItem>: UnwindSafe,
BoxRaw<ToolOutputItem>: UnwindSafe,
BoxRaw<FileChangeItem>: UnwindSafe,
BoxRaw<McpToolCallItem>: UnwindSafe,
BoxRaw<WebSearchItem>: UnwindSafe,
BoxRaw<HarnessEventItem>: UnwindSafe,
NonNull<u8>: UnwindSafe,
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