[][src]Enum exonum::messages::Message

pub enum Message {
    Service(Service),
    Consensus(Consensus),
    Responses(Responses),
    Requests(Requests),
}

Composition of every exonum protocol messages. This messages used in network p2p communications.

Variants

Service(Service)

Exonum basic node messages.

Consensus(Consensus)

Exonum consensus specific node messages.

Responses(Responses)

Exonum node responses.

Requests(Requests)

Exonum node requests.

Methods

impl Message[src]

pub fn deserialize(message: SignedMessage) -> Result<Self, Error>[src]

Converts raw SignedMessage into concrete Message message. Returns error if fails.

pub fn signed_message(&self) -> &SignedMessage[src]

Returns reference to inner SignedMessage.

impl Message[src]

pub fn new<T: ProtocolMessage>(
    message: T,
    author: PublicKey,
    secret_key: &SecretKey
) -> Message
[src]

Creates new protocol message.

Panics

This method can panic on serialization failure.

pub fn concrete<T: ProtocolMessage>(
    message: T,
    author: PublicKey,
    secret_key: &SecretKey
) -> Signed<T>
[src]

Creates new protocol message. Return concrete Signed<T>

Panics

This method can panic on serialization failure.

pub fn from_raw_buffer(buffer: Vec<u8>) -> Result<Message, Error>[src]

Checks buffer and return instance of Message.

pub fn sign_transaction<T>(
    transaction: T,
    service_id: u16,
    public_key: PublicKey,
    secret_key: &SecretKey
) -> Signed<RawTransaction> where
    T: Into<ServiceTransaction>, 
[src]

Creates a new raw transaction message.

Panics

This method can panic on serialization failure.

Trait Implementations

impl StorageValue for Message[src]

impl PartialEq<Message> for Message[src]

impl<T: ProtocolMessage> From<Signed<T>> for Message[src]

impl Clone for Message[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Message[src]

impl Debug for Message[src]

impl CryptoHash for Message[src]

Auto Trait Implementations

impl Send for Message

impl Sync for Message

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self