pub struct VersionInfo {
pub executable_checksum: String,
pub commit_hash: Option<String>,
pub next_executable_checksum: Option<String>,
pub next_upgrade_time: Option<i64>,
pub build_number: Option<i64>,
}Expand description
Used to store the version of the executable and the commit hash of the source code used to build it. Security verifications associated with the node software should be done with this message.
Fields§
§executable_checksum: StringThe value associated with the Sha2-256 hash of the executable calculated with shasum locally Should match github release page.
commit_hash: Option<String>This is only really useful in the security scenario where the node is building from source Otherwise, even if filled with a value from git, it’s not really verified
next_executable_checksum: Option<String>Same as prior hash except the intended upgrade hash of a node, not yet used.
next_upgrade_time: Option<i64>Intended time for performing a software update, for coordination of upgrades (not yet used.)
build_number: Option<i64>Build number associated with GitHub actions release action counter Should correspond directly to the executable hash, check the releases page for the correspondence
Implementations§
Source§impl VersionInfo
impl VersionInfo
Sourcepub fn commit_hash(&self) -> &str
pub fn commit_hash(&self) -> &str
Returns the value of commit_hash, or the default value if commit_hash is unset.
Sourcepub fn next_executable_checksum(&self) -> &str
pub fn next_executable_checksum(&self) -> &str
Returns the value of next_executable_checksum, or the default value if next_executable_checksum is unset.
Sourcepub fn next_upgrade_time(&self) -> i64
pub fn next_upgrade_time(&self) -> i64
Returns the value of next_upgrade_time, or the default value if next_upgrade_time is unset.
Sourcepub fn build_number(&self) -> i64
pub fn build_number(&self) -> i64
Returns the value of build_number, or the default value if build_number is unset.
Trait Implementations§
Source§impl Clone for VersionInfo
impl Clone for VersionInfo
Source§fn clone(&self) -> VersionInfo
fn clone(&self) -> VersionInfo
1.0.0 · 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§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>,
Source§impl Hash for VersionInfo
impl Hash for VersionInfo
Source§impl Message for VersionInfo
impl Message for VersionInfo
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for VersionInfo
impl PartialEq for VersionInfo
Source§impl Serialize for VersionInfo
impl Serialize for VersionInfo
impl Eq 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 UnwindSafe for VersionInfo
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
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<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> 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 more