pub trait VersionedProtocolMessage {
// Required method
fn check_version_supported(
&self,
protocol_config: &ProtocolConfig
) -> SuiResult;
// Provided method
fn message_version(&self) -> Option<u64> { ... }
}
Required Methods§
sourcefn check_version_supported(&self, protocol_config: &ProtocolConfig) -> SuiResult
fn check_version_supported(&self, protocol_config: &ProtocolConfig) -> SuiResult
Check that the version of the message is the correct one to use at this protocol version.
Provided Methods§
sourcefn message_version(&self) -> Option<u64>
fn message_version(&self) -> Option<u64>
Return version of message. Some messages depend on their enclosing messages to know the version number, so not every implementor implements this.