pub struct ProtocolVersionFormatV0 {
pub build: B64,
pub major: u32,
pub minor: u32,
pub patch: u32,
pub pre_release: u32,
}
Expand description
The Protocol Version V0 format. Encoded as 31 bytes with the following structure:
<reserved><build><major><minor><patch><pre-release>
<reserved> ::= <7 zeroed bytes>
<build> ::= <8 bytes>
<major> ::= <big-endian uint32>
<minor> ::= <big-endian uint32>
<patch> ::= <big-endian uint32>
<pre-release> ::= <big-endian uint32>
Fields§
§build: B64
Differentiates forks and custom-builds of standard protocol
major: u32
Incompatible API changes
minor: u32
Identifies additional functionality in backwards compatible manner
patch: u32
Identifies backward-compatible bug-fixes
pre_release: u32
Identifies unstable versions that may not satisfy the above
Implementations§
Source§impl ProtocolVersionFormatV0
impl ProtocolVersionFormatV0
Sourcepub fn is_readable_build_tag(&self) -> bool
pub fn is_readable_build_tag(&self) -> bool
Returns true if the build tag is human-readable, false otherwise.
Sourcepub fn encode(&self) -> [u8; 31]
pub fn encode(&self) -> [u8; 31]
Version-type 0 byte encoding:
<reserved><build><major><minor><patch><pre-release>
<reserved> ::= <7 zeroed bytes>
<build> ::= <8 bytes>
<major> ::= <big-endian uint32>
<minor> ::= <big-endian uint32>
<patch> ::= <big-endian uint32>
<pre-release> ::= <big-endian uint32>
Trait Implementations§
Source§impl Clone for ProtocolVersionFormatV0
impl Clone for ProtocolVersionFormatV0
Source§fn clone(&self) -> ProtocolVersionFormatV0
fn clone(&self) -> ProtocolVersionFormatV0
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProtocolVersionFormatV0
impl Debug for ProtocolVersionFormatV0
Source§impl Display for ProtocolVersionFormatV0
impl Display for ProtocolVersionFormatV0
Source§impl PartialEq for ProtocolVersionFormatV0
impl PartialEq for ProtocolVersionFormatV0
impl Copy for ProtocolVersionFormatV0
impl Eq for ProtocolVersionFormatV0
impl StructuralPartialEq for ProtocolVersionFormatV0
Auto Trait Implementations§
impl Freeze for ProtocolVersionFormatV0
impl RefUnwindSafe for ProtocolVersionFormatV0
impl Send for ProtocolVersionFormatV0
impl Sync for ProtocolVersionFormatV0
impl Unpin for ProtocolVersionFormatV0
impl UnwindSafe for ProtocolVersionFormatV0
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more