pub struct ToolSpec<H: ToolHandler> { /* private fields */ }Expand description
Declarative registration entry for one MCP tool.
Pairs the tool’s router-registration function with its mode gates.
Implementations§
Source§impl<H: ToolHandler> ToolSpec<H>
impl<H: ToolHandler> ToolSpec<H>
Sourcepub const fn async_tool<T: AsyncTool<H> + 'static>(
pinned: bool,
read_only: bool,
) -> Self
pub const fn async_tool<T: AsyncTool<H> + 'static>( pinned: bool, read_only: bool, ) -> Self
Creates a spec for an async tool T with its pinned and read-only gates.
Trait Implementations§
Auto Trait Implementations§
impl<H> Freeze for ToolSpec<H>
impl<H> RefUnwindSafe for ToolSpec<H>
impl<H> Send for ToolSpec<H>
impl<H> Sync for ToolSpec<H>
impl<H> Unpin for ToolSpec<H>
impl<H> UnsafeUnpin for ToolSpec<H>
impl<H> UnwindSafe for ToolSpec<H>
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