pub struct VersionHandshake {
pub range: (u16, u16),
pub capabilities: u64,
}Expand description
Wire handshake types. Both sides exchange their VersionRange at the start
of every nexar/QUIC connection. The receiving side calls negotiate to
compute the agreed version and rejects the connection if ranges are
disjoint.
§Transport wiring
The actual injection into the QUIC connection accept loop lives in
transport/client (outbound) and transport/server (inbound).
On connect, the client opens a dedicated bidi stream and sends
VersionHandshake { range: local_range } before any RPC frames.
The server reads the handshake, negotiates, and replies with
VersionHandshakeAck { agreed }. If ranges are disjoint the server
closes the QUIC connection with application error code 0x01.
See handshake_io and negotiation::negotiate for implementation.
Fields§
§range: (u16, u16)§capabilities: u64Optional capability bitmask for forward-compatible feature advertisement.
Unknown bits are ignored by the receiver. Defaults to 0 (no extra
capabilities) so older peers that do not set this field remain compatible.
Implementations§
Source§impl VersionHandshake
impl VersionHandshake
Sourcepub fn from_range(range: VersionRange) -> Self
pub fn from_range(range: VersionRange) -> Self
Build a handshake from a VersionRange.
Sourcepub fn to_range(&self) -> VersionRange
pub fn to_range(&self) -> VersionRange
Recover the VersionRange from wire fields.
Trait Implementations§
Source§impl Clone for VersionHandshake
impl Clone for VersionHandshake
Source§fn clone(&self) -> VersionHandshake
fn clone(&self) -> VersionHandshake
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VersionHandshake
impl Debug for VersionHandshake
Source§impl<'de> Deserialize<'de> for VersionHandshake
impl<'de> Deserialize<'de> for VersionHandshake
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'__msgpack_de> FromMessagePack<'__msgpack_de> for VersionHandshake
impl<'__msgpack_de> FromMessagePack<'__msgpack_de> for VersionHandshake
Source§impl PartialEq for VersionHandshake
impl PartialEq for VersionHandshake
Source§fn eq(&self, other: &VersionHandshake) -> bool
fn eq(&self, other: &VersionHandshake) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for VersionHandshake
impl Serialize for VersionHandshake
Source§impl ToMessagePack for VersionHandshake
impl ToMessagePack for VersionHandshake
impl Eq for VersionHandshake
impl StructuralPartialEq for VersionHandshake
Auto Trait Implementations§
impl Freeze for VersionHandshake
impl RefUnwindSafe for VersionHandshake
impl Send for VersionHandshake
impl Sync for VersionHandshake
impl Unpin for VersionHandshake
impl UnsafeUnpin for VersionHandshake
impl UnwindSafe for VersionHandshake
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.