pub struct ShellExecTool;Implementations§
Source§impl ShellExecTool
impl ShellExecTool
Trait Implementations§
Source§impl Default for ShellExecTool
impl Default for ShellExecTool
Source§impl Tool for ShellExecTool
impl Tool for ShellExecTool
Source§fn definition(&self) -> &ToolDefinition
fn definition(&self) -> &ToolDefinition
Stable borrow of the tool’s definition. Registry calls this once at
registration time (for summaries/schema lookup) — implementers
typically store a single
ToolDefinition in the struct.Source§fn call<'a>(&'a self, args: Value, ctx: &'a CallContext) -> CallFuture<'a>
fn call<'a>(&'a self, args: Value, ctx: &'a CallContext) -> CallFuture<'a>
Invoke the tool. Args are the deserialized JSON from the wire.
Source§fn supports_pagination(&self) -> bool
fn supports_pagination(&self) -> bool
SP-pagination-v1 §4.4 — whether this tool’s
call_paginated impl
produces meaningful pages (cursors emitted on first page, cursors
consumed on continuations). Default false: dispatch routes the
tool through Binding::call unchanged (preserving CLI / future
MCP / REST binding semantics). Tools that override call_paginated
must also override this to return true. Read moreSource§fn call_paginated<'a>(
&'a self,
args: Value,
ctx: &'a CallContext,
_cursor: Option<&'a str>,
) -> Pin<Box<dyn Future<Output = Result<PaginatedResult, ToolCallError>> + Send + 'a>>
fn call_paginated<'a>( &'a self, args: Value, ctx: &'a CallContext, _cursor: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<PaginatedResult, ToolCallError>> + Send + 'a>>
SP-pagination-v1 §4.4 — paginated variant. Default impl wraps
call
and returns next_cursor: None, so existing tools work unchanged.
Tools that want to paginate override this method AND supports_pagination. Read moreAuto Trait Implementations§
impl Freeze for ShellExecTool
impl RefUnwindSafe for ShellExecTool
impl Send for ShellExecTool
impl Sync for ShellExecTool
impl Unpin for ShellExecTool
impl UnsafeUnpin for ShellExecTool
impl UnwindSafe for ShellExecTool
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