prism_mcp_rs/client/
enhanced_traits.rs1use crate::protocol::types::ClientInfo;
4use std::fmt;
5
6impl fmt::Display for ClientInfo {
8 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9 write!(f, "{} v{}", self.name, self.version)
10 }
11}
12
13impl From<&str> for ClientInfo {
15 fn from(name: &str) -> Self {
16 ClientInfo::new(name.to_string(), "1.0.0".to_string())
17 }
18}
19
20impl From<(&str, &str)> for ClientInfo {
21 fn from((name, version): (&str, &str)) -> Self {
22 ClientInfo::new(name.to_string(), version.to_string())
23 }
24}
25
26