pub struct ProtocolVersion(/* private fields */);Expand description
Protocol version identifier.
This version is only bumped for breaking changes. Non-breaking changes should be introduced via capabilities.
Implementations§
Source§impl ProtocolVersion
impl ProtocolVersion
Sourcepub const V0: ProtocolVersion
pub const V0: ProtocolVersion
Version 0 of the protocol.
This was a pre-release version that shouldn’t be used in production. It is used as a fallback for any request whose version cannot be parsed as a valid version, and should likely be treated as unsupported.
Sourcepub const V1: ProtocolVersion
pub const V1: ProtocolVersion
Version 1 of the protocol.
Sourcepub const V2: ProtocolVersion
Available on crate feature unstable_protocol_v2 only.
pub const V2: ProtocolVersion
unstable_protocol_v2 only.Version 2 of the protocol.
This is an unstable draft used for protocol iteration. It is only
available when the unstable_protocol_v2 feature is enabled and is
not advertised by ProtocolVersion::LATEST yet — callers must
opt into V2 explicitly.
Sourcepub const LATEST: ProtocolVersion = Self::V1
pub const LATEST: ProtocolVersion = Self::V1
The latest stable supported version of the protocol.
Currently this is version 1. Enabling the unstable_protocol_v2
feature exposes ProtocolVersion::V2 but does not change the
value of LATEST — v2 will only become the latest once it stabilizes.
Trait Implementations§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
Source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProtocolVersion
Source§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
Source§impl<'de> Deserialize<'de> for ProtocolVersion
impl<'de> Deserialize<'de> for ProtocolVersion
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ProtocolVersion, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ProtocolVersion, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Display for ProtocolVersion
impl Display for ProtocolVersion
impl Eq for ProtocolVersion
Source§impl From<u16> for ProtocolVersion
impl From<u16> for ProtocolVersion
Source§fn from(value: u16) -> ProtocolVersion
fn from(value: u16) -> ProtocolVersion
Source§impl IntoV1 for ProtocolVersion
impl IntoV1 for ProtocolVersion
Source§type Output = ProtocolVersion
type Output = ProtocolVersion
Source§fn into_v1(
self,
) -> Result<<ProtocolVersion as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<ProtocolVersion as IntoV1>::Output, ProtocolConversionError>
Source§impl IntoV2 for ProtocolVersion
impl IntoV2 for ProtocolVersion
Source§type Output = ProtocolVersion
type Output = ProtocolVersion
Source§fn into_v2(
self,
) -> Result<<ProtocolVersion as IntoV2>::Output, ProtocolConversionError>
fn into_v2( self, ) -> Result<<ProtocolVersion as IntoV2>::Output, ProtocolConversionError>
Source§impl JsonSchema for ProtocolVersion
impl JsonSchema for ProtocolVersion
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for ProtocolVersion
impl Ord for ProtocolVersion
Source§fn cmp(&self, other: &ProtocolVersion) -> Ordering
fn cmp(&self, other: &ProtocolVersion) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
Source§fn eq(&self, other: &ProtocolVersion) -> bool
fn eq(&self, other: &ProtocolVersion) -> bool
self and other values to be equal, and is used by ==.