pub struct SupportedProtocolVersions {
pub min: ProtocolVersion,
pub max: ProtocolVersion,
}
Expand description
Models the set of protocol versions supported by a validator.
The sui-node
binary will always use the SYSTEM_DEFAULT constant, but for testing we need
to be able to inject arbitrary versions into SuiNode.
Fields§
§min: ProtocolVersion
§max: ProtocolVersion
Implementations§
source§impl SupportedProtocolVersions
impl SupportedProtocolVersions
pub const SYSTEM_DEFAULT: Self = _
sourcepub fn new_for_message(min: u64, max: u64) -> Self
pub fn new_for_message(min: u64, max: u64) -> Self
Use by VersionedProtocolMessage implementors to describe in which range of versions a message variant is supported.
pub fn new_for_testing(min: u64, max: u64) -> Self
pub fn is_version_supported(&self, v: ProtocolVersion) -> bool
Trait Implementations§
source§impl Clone for SupportedProtocolVersions
impl Clone for SupportedProtocolVersions
source§fn clone(&self) -> SupportedProtocolVersions
fn clone(&self) -> SupportedProtocolVersions
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 SupportedProtocolVersions
impl Debug for SupportedProtocolVersions
source§impl<'de> Deserialize<'de> for SupportedProtocolVersions
impl<'de> Deserialize<'de> for SupportedProtocolVersions
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for SupportedProtocolVersions
impl Hash for SupportedProtocolVersions
source§impl PartialEq for SupportedProtocolVersions
impl PartialEq for SupportedProtocolVersions
source§fn eq(&self, other: &SupportedProtocolVersions) -> bool
fn eq(&self, other: &SupportedProtocolVersions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SupportedProtocolVersions
impl Eq for SupportedProtocolVersions
impl StructuralPartialEq for SupportedProtocolVersions
Auto Trait Implementations§
impl RefUnwindSafe for SupportedProtocolVersions
impl Send for SupportedProtocolVersions
impl Sync for SupportedProtocolVersions
impl Unpin for SupportedProtocolVersions
impl UnwindSafe for SupportedProtocolVersions
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
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.