pub struct HookContextImpl {
pub app: AppContext,
pub state: RunState,
pub run_id: RunId,
pub iteration: usize,
pub tokens_used: usize,
}Expand description
Hook context implementation for observing run state.
Fields§
§app: AppContextThe application context for identity.
state: RunStateThe current run state.
run_id: RunIdThe run identifier.
iteration: usizeCurrent iteration count.
tokens_used: usizeCurrent token usage.
Trait Implementations§
Source§impl HookContext for HookContextImpl
impl HookContext for HookContextImpl
Source§fn current_state(&self) -> &RunState
fn current_state(&self) -> &RunState
Returns the current run state.
Source§fn snapshot(&self) -> RunSnapshot
fn snapshot(&self) -> RunSnapshot
Returns a snapshot of the current run for audit/replay.
Source§impl ReadonlyContext for HookContextImpl
impl ReadonlyContext for HookContextImpl
Auto Trait Implementations§
impl Freeze for HookContextImpl
impl RefUnwindSafe for HookContextImpl
impl Send for HookContextImpl
impl Sync for HookContextImpl
impl Unpin for HookContextImpl
impl UnsafeUnpin for HookContextImpl
impl UnwindSafe for HookContextImpl
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