Trait exonum::messages::Message
[−]
[src]
pub trait Message: CryptoHash + Debug + Send + Sync { fn from_raw(raw: RawMessage) -> Result<Self, Error>
where
Self: Sized; fn raw(&self) -> &RawMessage; fn verify_signature(&self, pub_key: &PublicKey) -> bool { ... } }
Represents generic message interface.
An Exonum message is a piece of data that is signed by the creator's Ed25519 key; the resulting digital signature is a part of the message.
Required Methods
fn from_raw(raw: RawMessage) -> Result<Self, Error> where
Self: Sized,
Self: Sized,
Converts the raw message into the specific one.
fn raw(&self) -> &RawMessage
Returns raw message.
Provided Methods
fn verify_signature(&self, pub_key: &PublicKey) -> bool
Verifies the message using given public key.
Implementors
impl Message for RawMessage
impl Message for Connect
impl Message for Status
impl Message for Propose
impl Message for Prevote
impl Message for Precommit
impl Message for BlockResponse
impl Message for ProposeRequest
impl Message for TransactionsRequest
impl Message for PrevotesRequest
impl Message for PeersRequest
impl Message for BlockRequest