pub struct VersionInfo {
pub binary_version: String,
pub protocol_min: u32,
pub protocol_max: u32,
pub log_format_min: u32,
pub log_format_max: u32,
pub snapshot_format_min: u32,
pub snapshot_format_max: u32,
pub feature_set: BTreeSet<String>,
}Expand description
Version and format compatibility envelope every node advertises (spec section 11.8; ADR-0010 decision 5).
Ranges are inclusive. The derived Default describes a descriptor
written before Stage 2H that never carried an advertisement: its zeroed
ranges overlap only other zeroed ranges, so a missing advertisement fails
closed against any real one (spec section 4.10).
Fields§
§binary_version: StringEngine package version of the running binary (CARGO_PKG_VERSION).
protocol_min: u32Oldest wire-protocol version accepted.
protocol_max: u32Newest wire-protocol version spoken.
log_format_min: u32Oldest committed-command log format read.
log_format_max: u32Newest committed-command log format written.
snapshot_format_min: u32Oldest replicated snapshot format read.
snapshot_format_max: u32Newest replicated snapshot format written.
feature_set: BTreeSet<String>Names of cluster features this build can activate; the advertised set gates feature activation (spec section 11.8 step 5).
Implementations§
Source§impl VersionInfo
impl VersionInfo
Sourcepub fn current() -> Self
pub fn current() -> Self
The advertisement of the running binary, sourced from the build environment and this crate’s declared format ranges.
Sourcepub fn is_compatible_with(&self, other: &Self) -> Result<(), Incompatibility>
pub fn is_compatible_with(&self, other: &Self) -> Result<(), Incompatibility>
Verify that this node and other can interoperate in one cluster.
Compatibility requires every advertised range pair to overlap: with
the N/N-1 support window (spec section 17) an N binary accepts
[N-1, N] and an N-1 binary accepts [N-1, N-1], which overlap, while
a two-version skew does not. Failures fail closed with a typed
Incompatibility naming the first non-overlapping range.
Trait Implementations§
Source§impl Clone for VersionInfo
impl Clone for VersionInfo
Source§fn clone(&self) -> VersionInfo
fn clone(&self) -> VersionInfo
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 VersionInfo
impl Debug for VersionInfo
Source§impl Default for VersionInfo
impl Default for VersionInfo
Source§fn default() -> VersionInfo
fn default() -> VersionInfo
Source§impl<'de> Deserialize<'de> for VersionInfo
impl<'de> Deserialize<'de> for VersionInfo
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>,
impl Eq for VersionInfo
Source§impl PartialEq for VersionInfo
impl PartialEq for VersionInfo
Source§impl Serialize for VersionInfo
impl Serialize for VersionInfo
impl StructuralPartialEq for VersionInfo
Auto Trait Implementations§
impl Freeze for VersionInfo
impl RefUnwindSafe for VersionInfo
impl Send for VersionInfo
impl Sync for VersionInfo
impl Unpin for VersionInfo
impl UnsafeUnpin for VersionInfo
impl UnwindSafe for VersionInfo
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.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> 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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request