Skip to main content

prefix_tool_name

Function prefix_tool_name 

Source
pub fn prefix_tool_name(namespace: &str, tool_name: &str) -> String
Expand description

Creates a namespaced tool name by combining namespace and tool name with :: separator.

§Arguments

  • namespace - The namespace prefix
  • tool_name - The original tool name

§Returns

A string in the format namespace::tool_name

§Example

use magi_tool::prefix_tool_name;
let name = prefix_tool_name("web", "search");
assert_eq!(name, "web::search");