Struct exonum_configuration::TxConfigVote
[−]
pub struct TxConfigVote { /* fields omitted */ }
Methods
impl TxConfigVote
fn new(
from: &PublicKey,
cfg_hash: &Hash,
secret_key: &SecretKey
) -> TxConfigVote
from: &PublicKey,
cfg_hash: &Hash,
secret_key: &SecretKey
) -> TxConfigVote
Creates messsage and sign it.
fn new_with_signature(
from: &PublicKey,
cfg_hash: &Hash,
signature: &Signature
) -> TxConfigVote
from: &PublicKey,
cfg_hash: &Hash,
signature: &Signature
) -> TxConfigVote
Creates message and appends existing signature.
fn message_id() -> u16
Returns message_id
useable for matching.
fn service_id() -> u16
Returns service_id
useable for matching.
fn from(&self) -> &PublicKey
fn cfg_hash(&self) -> &Hash
Trait Implementations
impl Clone for TxConfigVote
fn clone(&self) -> TxConfigVote
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for TxConfigVote
fn eq(&self, __arg_0: &TxConfigVote) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TxConfigVote) -> bool
This method tests for !=
.
impl Message for TxConfigVote
fn raw(&self) -> &RawMessage
Returns raw message.
fn hash(&self) -> Hash
Returns hash of the RawMessage
.
fn verify_signature(&self, pub_key: &PublicKey) -> bool
Verifies the message using given public key.
impl<'a> SegmentField<'a> for TxConfigVote
fn item_size() -> Offset
size of item fixed part that this Field
collect.
fn count(&self) -> Offset
count of items in collection
fn extend_buffer(&self, buffer: &mut Vec<u8>)
extend buffer with this collection
unsafe fn from_buffer(buffer: &'a [u8], from: Offset, count: Offset) -> Self
create collection from buffer
fn check_data(
buffer: &'a [u8],
from: CheckedOffset,
count: CheckedOffset,
latest_segment: CheckedOffset
) -> Result
buffer: &'a [u8],
from: CheckedOffset,
count: CheckedOffset,
latest_segment: CheckedOffset
) -> Result
check collection data
impl FromRaw for TxConfigVote
fn from_raw(raw: RawMessage) -> Result<TxConfigVote, Error>
Converts the raw message into the specific one.
impl StorageValue for TxConfigVote
fn hash(&self) -> Hash
Returns a hash of the value. Read more
fn into_bytes(self) -> Vec<u8>
Serialize a value into a vector of bytes.
fn from_bytes(value: Cow<[u8]>) -> Self
Deserialize a value from bytes.
impl Debug for TxConfigVote
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl ExonumJson for TxConfigVote
fn deserialize_field<B>(
value: &Value,
buffer: &mut B,
from: Offset,
to: Offset
) -> Result<(), Box<Error>> where
B: WriteBufferWrapper,
value: &Value,
buffer: &mut B,
from: Offset,
to: Offset
) -> Result<(), Box<Error>> where
B: WriteBufferWrapper,
write deserialized field in buffer on place.
fn serialize_field(&self) -> Result<Value, Box<Error>>
serialize field as json::Value
impl ExonumJsonDeserialize for TxConfigVote
fn deserialize(value: &Value) -> Result<Self, Box<Error>>
deserialize json
value.
impl<'de> Deserialize<'de> for TxConfigVote
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Serialize for TxConfigVote
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Transaction for TxConfigVote
[src]
fn verify(&self) -> bool
Verifies the transaction, which includes the message signature verification and other specific internal constraints. verify is intended to check the internal consistency of a transaction; it has no access to the blockchain state. If a transaction fails verify, it is considered incorrect and cannot be included into any correct block proposal. Incorrect transactions are never included into the blockchain. Read more
fn execute(&self, fork: &mut Fork)
Takes the current blockchain state via fork
and can modify it if certain conditions are met. Read more
fn info(&self) -> Value
Returns the useful information about the transaction in the JSON format.