pub struct ServerProfile {
pub server_id: String,
pub transport: TransportKind,
pub command: Option<Vec<String>>,
pub url: Option<String>,
pub first_seen_at: i64,
pub command_hash: Option<String>,
pub descriptor_hash: Option<String>,
pub trust_level: TrustLevel,
pub sandbox_profile_id: Option<String>,
}Expand description
一个 MCP server 的身份档案 —— 启动命令、传输方式、信任等级、绑定的 sandbox profile。
Fields§
§server_id: String唯一 id。
transport: TransportKind传输类型。
command: Option<Vec<String>>Stdio 启动时的 argv(完整命令);Http 时为 None。
url: Option<String>Http 传输时的 URL;Stdio 时为 None。
first_seen_at: i64首次登记时间(Unix epoch 秒)。
command_hash: Option<String>Stdio 传输时:sha256(argv) 的十六进制;用于识别命令漂移。
descriptor_hash: Option<String>聚合后的工具描述符 hash;用于 I05 descriptor pinning。
trust_level: TrustLevel信任等级。
sandbox_profile_id: Option<String>绑定到某个 sandbox profile;None 表示继承默认最小权限。
Trait Implementations§
Source§impl Clone for ServerProfile
impl Clone for ServerProfile
Source§fn clone(&self) -> ServerProfile
fn clone(&self) -> ServerProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServerProfile
impl Debug for ServerProfile
Source§impl<'de> Deserialize<'de> for ServerProfile
impl<'de> Deserialize<'de> for ServerProfile
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
Source§impl PartialEq for ServerProfile
impl PartialEq for ServerProfile
Source§fn eq(&self, other: &ServerProfile) -> bool
fn eq(&self, other: &ServerProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ServerProfile
impl Serialize for ServerProfile
impl Eq for ServerProfile
impl StructuralPartialEq for ServerProfile
Auto Trait Implementations§
impl Freeze for ServerProfile
impl RefUnwindSafe for ServerProfile
impl Send for ServerProfile
impl Sync for ServerProfile
impl Unpin for ServerProfile
impl UnsafeUnpin for ServerProfile
impl UnwindSafe for ServerProfile
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