pub struct InvocationContext {
pub runtime: RuntimeContext,
pub input: Value,
pub services: InvocationServices,
}Expand description
InvocationContext - Context for invoking an agent or tool
Extends RuntimeContext with invocation-specific fields like input and available services.
Fields§
§runtime: RuntimeContextRuntime context
input: ValueInvocation input
services: InvocationServicesServices available to the invocation
Implementations§
Source§impl InvocationContext
impl InvocationContext
Sourcepub fn new(runtime: RuntimeContext, input: Value) -> Self
pub fn new(runtime: RuntimeContext, input: Value) -> Self
Create a new InvocationContext
Sourcepub fn with_all_services(self) -> Self
pub fn with_all_services(self) -> Self
Enable all services
Sourcepub fn with_services(self, services: InvocationServices) -> Self
pub fn with_services(self, services: InvocationServices) -> Self
Enable specific services
Sourcepub fn execution_id(&self) -> &ExecutionId
pub fn execution_id(&self) -> &ExecutionId
Get the execution ID
Sourcepub fn runtime(&self) -> &RuntimeContext
pub fn runtime(&self) -> &RuntimeContext
Get the runtime context
Trait Implementations§
Source§impl Clone for InvocationContext
impl Clone for InvocationContext
Source§fn clone(&self) -> InvocationContext
fn clone(&self) -> InvocationContext
Returns a duplicate of the value. Read more
1.0.0 · 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 InvocationContext
impl Debug for InvocationContext
Source§impl<'de> Deserialize<'de> for InvocationContext
impl<'de> Deserialize<'de> for InvocationContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InvocationContext
impl RefUnwindSafe for InvocationContext
impl Send for InvocationContext
impl Sync for InvocationContext
impl Unpin for InvocationContext
impl UnsafeUnpin for InvocationContext
impl UnwindSafe for InvocationContext
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