pub struct LookupItemTool {
pub crate_name: String,
pub item_path: String,
pub version: Option<String>,
pub format: Option<String>,
}Expand description
查找 crate 中的特定项目工具
Fields§
§crate_name: StringCrate name
item_path: String项目路径(例如 std::collections::HashMap)
version: Option<String>Version (optional, defaults to latest)
format: Option<String>Output format: markdown, text, or html
Implementations§
Source§impl LookupItemTool
impl LookupItemTool
Sourcepub fn request_params() -> CallToolRequestParams
pub fn request_params() -> CallToolRequestParams
Returns a CallToolRequestParams initialized with the current tool’s name.
You can further customize the request by adding arguments or other attributes using the builder pattern. For example:
ⓘ
let args = serde_json::Map::new();
let task_meta = TaskMetadata{ttl: Some(200)}
let params: CallToolRequestParams = MyTool::request_params()
.with_arguments(args)
.with_task(task_meta);§Returns
A CallToolRequestParams with the tool name set.
Source§impl LookupItemTool
impl LookupItemTool
pub fn json_schema() -> Map<String, Value>
Trait Implementations§
Source§impl Clone for LookupItemTool
impl Clone for LookupItemTool
Source§fn clone(&self) -> LookupItemTool
fn clone(&self) -> LookupItemTool
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 LookupItemTool
impl Debug for LookupItemTool
Source§impl<'de> Deserialize<'de> for LookupItemTool
impl<'de> Deserialize<'de> for LookupItemTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LookupItemTool
impl RefUnwindSafe for LookupItemTool
impl Send for LookupItemTool
impl Sync for LookupItemTool
impl Unpin for LookupItemTool
impl UnsafeUnpin for LookupItemTool
impl UnwindSafe for LookupItemTool
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