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 moreAuto Trait Implementations§
impl Freeze for ToolRequest
impl !RefUnwindSafe for ToolRequest
impl Send for ToolRequest
impl Sync for ToolRequest
impl Unpin for ToolRequest
impl UnsafeUnpin 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