pub struct ToolRequest {
pub ctx: RequestContext,
pub args: Value,
}Expand description
Request type for tool services.
Contains the request context (for progress reporting, cancellation, etc.) and the tool arguments as raw JSON.
Fields§
§ctx: RequestContextRequest context for progress reporting, cancellation, and client requests
args: ValueTool arguments as raw JSON
Implementations§
Source§impl ToolRequest
impl ToolRequest
Sourcepub fn new(ctx: RequestContext, args: Value) -> Self
pub fn new(ctx: RequestContext, args: Value) -> Self
Create a new tool request
Trait Implementations§
Source§impl Clone for ToolRequest
impl Clone for ToolRequest
Source§fn clone(&self) -> ToolRequest
fn clone(&self) -> ToolRequest
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 ToolRequest
impl Debug for ToolRequest
Source§impl<S> Service<ToolRequest> for ToolCatchError<S>where
S: Service<ToolRequest, Response = CallToolResult> + Clone + Send + 'static,
S::Error: Display + Send,
S::Future: Send,
impl<S> Service<ToolRequest> for ToolCatchError<S>where
S: Service<ToolRequest, Response = CallToolResult> + Clone + Send + 'static,
S::Error: Display + Send,
S::Future: Send,
Source§type Response = CallToolResult
type Response = CallToolResult
Responses given by the service.
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<CallToolResult, Infallible>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<CallToolResult, Infallible>> + Send>>
The future response value.
Auto Trait Implementations§
impl Freeze for ToolRequest
impl !RefUnwindSafe for ToolRequest
impl Send for ToolRequest
impl Sync for ToolRequest
impl Unpin for ToolRequest
impl !UnwindSafe for ToolRequest
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