Struct ProtocolVersion
pub struct ProtocolVersion {
pub major: u16,
pub minor: u16,
}Expand description
Protocol version as a major.minor pair.
Serialized on the wire as the textual "major.minor" form (e.g. "1.0"),
matching the handshake examples and the plugin manifest. A differing major
version between peers is fatal; a differing minor is tolerated.
Fields§
§major: u16Major version; a mismatch between peers is a hard error.
minor: u16Minor version; a mismatch between peers is tolerated.
Implementations§
§impl ProtocolVersion
impl ProtocolVersion
Trait Implementations§
§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
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 ProtocolVersion
§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
§impl<'de> Deserialize<'de> for ProtocolVersion
impl<'de> Deserialize<'de> for ProtocolVersion
§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>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for ProtocolVersion
impl Display for ProtocolVersion
impl Eq for ProtocolVersion
§impl From<ProtocolVersion> for String
impl From<ProtocolVersion> for String
§fn from(value: ProtocolVersion) -> Self
fn from(value: ProtocolVersion) -> Self
Converts to this type from the input type.
§impl FromStr for ProtocolVersion
impl FromStr for ProtocolVersion
§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
§impl Serialize for ProtocolVersion
impl Serialize for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Freeze for ProtocolVersion
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnsafeUnpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
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