pub enum McpVersion {
V2024_11_05,
V2025_03_26,
V2025_06_18,
}
Expand description
Supported MCP protocol versions
Variants§
V2024_11_05
Original protocol without streamable HTTP (introduced 2024-11-05)
V2025_03_26
Protocol including streamable HTTP (introduced 2025-03-26)
V2025_06_18
Protocol with structured _meta, cursor, progressToken, and elicitation (introduced 2025-06-18)
Implementations§
Source§impl McpVersion
impl McpVersion
Sourcepub const LATEST: McpVersion = McpVersion::V2025_06_18
pub const LATEST: McpVersion = McpVersion::V2025_06_18
The latest protocol version implemented by this crate
Sourcepub const CURRENT: McpVersion = McpVersion::V2025_06_18
pub const CURRENT: McpVersion = McpVersion::V2025_06_18
The current protocol version implemented by this crate
Sourcepub fn from_str(s: &str) -> Option<McpVersion>
pub fn from_str(s: &str) -> Option<McpVersion>
Parse a version string like “2024-11-05”, “2025-03-26”, or “2025-06-18”
Sourcepub fn supports_streamable_http(&self) -> bool
pub fn supports_streamable_http(&self) -> bool
Returns whether this version supports streamable HTTP (SSE)
Sourcepub fn supports_meta_fields(&self) -> bool
pub fn supports_meta_fields(&self) -> bool
Returns whether this version supports _meta
fields in requests, responses, and notifications
Sourcepub fn supports_progress_and_cursor(&self) -> bool
pub fn supports_progress_and_cursor(&self) -> bool
Returns whether this version supports the use of progressToken
and cursor
in _meta
Sourcepub fn supports_elicitation(&self) -> bool
pub fn supports_elicitation(&self) -> bool
Returns whether this version supports structured user elicitation via JSON Schema
Sourcepub fn supported_features(&self) -> Vec<&'static str>
pub fn supported_features(&self) -> Vec<&'static str>
Get a list of feature names supported by this version
Trait Implementations§
Source§impl Clone for McpVersion
impl Clone for McpVersion
Source§fn clone(&self) -> McpVersion
fn clone(&self) -> McpVersion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for McpVersion
impl Debug for McpVersion
Source§impl Default for McpVersion
impl Default for McpVersion
Source§fn default() -> McpVersion
fn default() -> McpVersion
Source§impl<'de> Deserialize<'de> for McpVersion
impl<'de> Deserialize<'de> for McpVersion
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for McpVersion
impl Display for McpVersion
Source§impl FromStr for McpVersion
impl FromStr for McpVersion
Source§impl Hash for McpVersion
impl Hash for McpVersion
Source§impl PartialEq for McpVersion
impl PartialEq for McpVersion
Source§impl Serialize for McpVersion
impl Serialize for McpVersion
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,
impl Copy for McpVersion
impl Eq for McpVersion
impl StructuralPartialEq for McpVersion
Auto Trait Implementations§
impl Freeze for McpVersion
impl RefUnwindSafe for McpVersion
impl Send for McpVersion
impl Sync for McpVersion
impl Unpin for McpVersion
impl UnwindSafe for McpVersion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.