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 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
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 McpVersion
impl Debug for McpVersion
Source§impl Default for McpVersion
impl Default for McpVersion
Source§fn default() -> McpVersion
fn default() -> McpVersion
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
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 Ord for McpVersion
impl Ord for McpVersion
Source§fn cmp(&self, other: &McpVersion) -> Ordering
fn cmp(&self, other: &McpVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for McpVersion
impl PartialEq for McpVersion
Source§impl PartialOrd for McpVersion
impl PartialOrd 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,
Serialize this value into the given Serde serializer. Read more
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
Mutably borrows from an owned value. Read more