Struct exonum_configuration::StorageValueConfigProposeData []

pub struct StorageValueConfigProposeData { /* fields omitted */ }

Methods

impl StorageValueConfigProposeData

Creates a new instance with given parameters.

Hashes data as a raw byte array and returns the resulting hash.

impl StorageValueConfigProposeData
[src]

This structure logically contains 2 fields:

  1. TxConfigPropose in tx_propose field.

  2. Reference to votes_by_config_hash table. This reference is represented by 2 fields:

    • votest_history_hash
    • num_votes

Length of the table is stored in num_votes field, which isn't changed after table initialization, because number of possible vote slots for a config is determined by number of validators in its previous config.

Table's root hash - in votes_history_hash field, which is modified after a vote from validator is added.

Method to mutate votes_history_hash field containing root hash of votes_by_config_hash after replacing empty vote with a real TxConfigVote cast by a validator.

Trait Implementations

impl Clone for StorageValueConfigProposeData

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for StorageValueConfigProposeData

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Field<'a> for StorageValueConfigProposeData

Read Field from buffer, with given position, beware of memory unsafety, you should check Field before read. Read more

Write Field to buffer, in given position write doesn't lead to memory unsafety. Read more

Checks if data in the buffer could be deserialized. Returns an index of latest data seen. Read more

Field's header size

impl StorageValue for StorageValueConfigProposeData

Serialize a value into a vector of bytes.

Deserialize a value from bytes.

Returns a hash of the value. Read more

impl Debug for StorageValueConfigProposeData

Formats the value using the given formatter.

impl ExonumJson for StorageValueConfigProposeData

write deserialized field in buffer on place.

serialize field as json::Value

impl ExonumJsonDeserialize for StorageValueConfigProposeData

deserialize json value.

impl<'de> Deserialize<'de> for StorageValueConfigProposeData

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for StorageValueConfigProposeData

Serialize this value into the given Serde serializer. Read more