pub struct McpServiceConfig {
pub name: String,
pub command: String,
pub args: Option<Vec<String>>,
pub env: Option<HashMap<String, String>>,
pub tool_filter: Option<ToolFilter>,
}Expand description
MCP 服务配置
Fields§
§name: String服务名称
command: String启动命令
args: Option<Vec<String>>命令参数
env: Option<HashMap<String, String>>环境变量
tool_filter: Option<ToolFilter>工具过滤配置
Implementations§
Source§impl McpServiceConfig
impl McpServiceConfig
Sourcepub fn new(name: String, command: String) -> McpServiceConfig
pub fn new(name: String, command: String) -> McpServiceConfig
创建新配置
Sourcepub fn with_args(self, args: Vec<String>) -> McpServiceConfig
pub fn with_args(self, args: Vec<String>) -> McpServiceConfig
设置参数
Sourcepub fn with_tool_filter(self, filter: ToolFilter) -> McpServiceConfig
pub fn with_tool_filter(self, filter: ToolFilter) -> McpServiceConfig
设置工具过滤器
Trait Implementations§
Source§impl Clone for McpServiceConfig
impl Clone for McpServiceConfig
Source§fn clone(&self) -> McpServiceConfig
fn clone(&self) -> McpServiceConfig
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 McpServiceConfig
impl Debug for McpServiceConfig
Source§impl<'de> Deserialize<'de> for McpServiceConfig
impl<'de> Deserialize<'de> for McpServiceConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpServiceConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpServiceConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for McpServiceConfig
impl Serialize for McpServiceConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for McpServiceConfig
impl RefUnwindSafe for McpServiceConfig
impl Send for McpServiceConfig
impl Sync for McpServiceConfig
impl Unpin for McpServiceConfig
impl UnwindSafe for McpServiceConfig
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