pub struct SubprotocolVersion {
pub major: u8,
pub minor: u8,
}Expand description
Semantic version for subprotocol negotiation.
Two peers are compatible if both peers’ version >= the other’s
min_compatible. Wire format: 2 bytes (major, minor).
Fields§
§major: u8Major version — breaking changes increment this.
minor: u8Minor version — backward-compatible changes.
Implementations§
Source§impl SubprotocolVersion
impl SubprotocolVersion
Trait Implementations§
Source§impl Clone for SubprotocolVersion
impl Clone for SubprotocolVersion
Source§fn clone(&self) -> SubprotocolVersion
fn clone(&self) -> SubprotocolVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SubprotocolVersion
Source§impl Debug for SubprotocolVersion
impl Debug for SubprotocolVersion
Source§impl Display for SubprotocolVersion
impl Display for SubprotocolVersion
impl Eq for SubprotocolVersion
Source§impl Hash for SubprotocolVersion
impl Hash for SubprotocolVersion
Source§impl Ord for SubprotocolVersion
impl Ord for SubprotocolVersion
Source§fn cmp(&self, other: &SubprotocolVersion) -> Ordering
fn cmp(&self, other: &SubprotocolVersion) -> Ordering
1.21.0 (const: unstable) · 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 SubprotocolVersion
impl PartialEq for SubprotocolVersion
Source§fn eq(&self, other: &SubprotocolVersion) -> bool
fn eq(&self, other: &SubprotocolVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SubprotocolVersion
impl PartialOrd for SubprotocolVersion
impl StructuralPartialEq for SubprotocolVersion
Auto Trait Implementations§
impl Freeze for SubprotocolVersion
impl RefUnwindSafe for SubprotocolVersion
impl Send for SubprotocolVersion
impl Sync for SubprotocolVersion
impl Unpin for SubprotocolVersion
impl UnsafeUnpin for SubprotocolVersion
impl UnwindSafe for SubprotocolVersion
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
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
Compare self to
key and return true if they are equal.