[][src]Trait exonum::messages::Message

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

Converts the raw message into the specific one.

fn raw(&self) -> &RawMessage

Returns raw message.

Loading content...

Provided methods

fn verify_signature(&self, pub_key: &PublicKey) -> bool

Verifies the message using given public key.

Loading content...

Implementors

impl Message for BlockRequest
[src]

impl Message for BlockResponse
[src]

impl Message for Connect
[src]

impl Message for PeersRequest
[src]

impl Message for Precommit
[src]

impl Message for Prevote
[src]

impl Message for PrevotesRequest
[src]

impl Message for Propose
[src]

impl Message for ProposeRequest
[src]

impl Message for RawMessage
[src]

impl Message for Status
[src]

impl Message for TransactionsRequest
[src]

impl Message for TransactionsResponse
[src]

Loading content...