pub struct ToolCallContext<'s, S> {
pub request_context: RequestContext<RoleServer>,
pub service: &'s S,
pub name: Cow<'static, str>,
pub arguments: Option<JsonObject>,
}Available on crate feature
server only.Fields§
§request_context: RequestContext<RoleServer>§service: &'s S§name: Cow<'static, str>§arguments: Option<JsonObject>Implementations§
Source§impl<'s, S> ToolCallContext<'s, S>
impl<'s, S> ToolCallContext<'s, S>
pub fn new( service: &'s S, _: CallToolRequestParam, request_context: RequestContext<RoleServer>, ) -> Self
pub fn name(&self) -> &str
pub fn request_context(&self) -> &RequestContext<RoleServer>
Source§impl<'s, S> ToolCallContext<'s, S>
impl<'s, S> ToolCallContext<'s, S>
pub fn invoke<H, A>(self, h: H) -> BoxFuture<'s, Result<CallToolResult, Error>>where
H: CallToolHandler<S, A>,
Auto Trait Implementations§
impl<'s, S> Freeze for ToolCallContext<'s, S>
impl<'s, S> !RefUnwindSafe for ToolCallContext<'s, S>
impl<'s, S> Send for ToolCallContext<'s, S>where
S: Sync,
impl<'s, S> Sync for ToolCallContext<'s, S>where
S: Sync,
impl<'s, S> Unpin for ToolCallContext<'s, S>
impl<'s, S> UnsafeUnpin for ToolCallContext<'s, S>
impl<'s, S> !UnwindSafe for ToolCallContext<'s, S>
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