#[non_exhaustive]pub enum WireProfile {
V1_0_0,
V0_0_2Beta,
}Expand description
A shape of the S2 JSON wire.
The two tagged versions of S2 JSON differ in exactly one place. Content-diffing them
(ignoring $id) shows:
v0.0.2-beta | v1.0.0 | |
|---|---|---|
DDBC.SystemDescription | required present_demand_rate | field absent |
DDBC.PresentDemandStatus | does not exist | a message |
| everything else | identical | identical |
So one enum and one Option carry the whole difference, and the codec enforces it
per negotiated version.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
V1_0_0
S2 JSON v1.0.0.
V0_0_2Beta
S2 JSON v0.0.2-beta — what the deployed ecosystem still negotiates.
Implementations§
Source§impl WireProfile
impl WireProfile
Sourcepub const fn version_str(self) -> &'static str
pub const fn version_str(self) -> &'static str
The version string this crate offers for the profile in an S2 JSON handshake.
No v, which is what every deployed implementation negotiates;
connect_version_str is the other spelling.
Sourcepub const fn connect_version_str(self) -> &'static str
pub const fn connect_version_str(self) -> &'static str
The version string this crate offers for the profile over S2 Connect.
With the v, which S2C §Versioning of JSON Schema files requires. Only what goes
out: ProtocolVersion::matches understands either spelling (E25).
Sourcepub fn version(self) -> ProtocolVersion
pub fn version(self) -> ProtocolVersion
The version string, as a ProtocolVersion.
Sourcepub fn connect_version(self) -> ProtocolVersion
pub fn connect_version(self) -> ProtocolVersion
The S2 Connect version string, as a ProtocolVersion.
Sourcepub const fn ddbc_system_description_carries_demand_rate(self) -> bool
pub const fn ddbc_system_description_carries_demand_rate(self) -> bool
Whether DDBC.SystemDescription must carry present_demand_rate.
Trait Implementations§
Source§impl Clone for WireProfile
impl Clone for WireProfile
Source§fn clone(&self) -> WireProfile
fn clone(&self) -> WireProfile
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 WireProfile
Source§impl Debug for WireProfile
impl Debug for WireProfile
Source§impl Default for WireProfile
impl Default for WireProfile
Source§fn default() -> WireProfile
fn default() -> WireProfile
Source§impl Display for WireProfile
impl Display for WireProfile
impl Eq for WireProfile
Source§impl Hash for WireProfile
impl Hash for WireProfile
Source§impl Ord for WireProfile
impl Ord for WireProfile
Source§fn cmp(&self, other: &WireProfile) -> Ordering
fn cmp(&self, other: &WireProfile) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WireProfile
impl PartialEq for WireProfile
Source§impl PartialOrd for WireProfile
impl PartialOrd for WireProfile
impl StructuralPartialEq for WireProfile
Auto Trait Implementations§
impl Freeze for WireProfile
impl RefUnwindSafe for WireProfile
impl Send for WireProfile
impl Sync for WireProfile
impl Unpin for WireProfile
impl UnsafeUnpin for WireProfile
impl UnwindSafe for WireProfile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.