pub struct ToolSource {
pub extend: fn(&mut ToolRouter<McpServer>),
}Available on crate feature
mcp and non-WebAssembly only.Expand description
A crate’s contribution to the server’s tool set.
A crate that defines tools of its own submits one of these from a link-time
registration; the server calls every extend once, while it is built.
Fields§
§extend: fn(&mut ToolRouter<McpServer>)Register this crate’s tools on the router.
Trait Implementations§
impl Collect for ToolSource
Auto Trait Implementations§
impl Forget for ToolSource
impl Freeze for ToolSource
impl RefUnwindSafe for ToolSource
impl Send for ToolSource
impl Sync for ToolSource
impl Unpin for ToolSource
impl UnsafeUnpin for ToolSource
impl UnwindSafe for ToolSource
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