pub struct RunContext { /* private fields */ }Expand description
Runtime context wrapper for agent execution
The context holds user-provided state and usage statistics. It is passed to tools, hooks, and other callbacks during execution.
Implementations§
Source§impl RunContext
impl RunContext
Sourcepub fn with_context<T: Any + Send + Sync + 'static>(data: T) -> Self
pub fn with_context<T: Any + Send + Sync + 'static>(data: T) -> Self
Create a run context with user data
Trait Implementations§
Source§impl Clone for RunContext
impl Clone for RunContext
Source§fn clone(&self) -> RunContext
fn clone(&self) -> RunContext
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 moreSource§impl Debug for RunContext
impl Debug for RunContext
Auto Trait Implementations§
impl !RefUnwindSafe for RunContext
impl !UnwindSafe for RunContext
impl Freeze for RunContext
impl Send for RunContext
impl Sync for RunContext
impl Unpin for RunContext
impl UnsafeUnpin for RunContext
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