[][src]Struct exonum::messages::SignedMessage

pub struct SignedMessage {
    pub payload: Vec<u8>,
    pub author: PublicKey,
    pub signature: Signature,
}

Protobuf-based container for an arbitrary signed message.

See module documentation for examples.

Fields

payload: Vec<u8>

Payload of the message.

author: PublicKey

PublicKey of the author of the message.

signature: Signature

Digital signature over payload created with the secret key of the author of the message.

Methods

impl SignedMessage[src]

pub fn into_verified<T>(self) -> Result<Verified<T>> where
    T: TryFrom<Self>, 
[src]

Verifies message signature and returns the corresponding checked message.

impl SignedMessage[src]

pub fn new(
    payload: impl BinaryValue,
    author: PublicKey,
    secret_key: &SecretKey
) -> Self
[src]

Creates a new signed message from the given binary value.

Trait Implementations

impl BinaryValue for SignedMessage[src]

impl Clone for SignedMessage[src]

impl Debug for SignedMessage[src]

impl<'de> Deserialize<'de> for SignedMessage[src]

impl Display for SignedMessage[src]

impl Eq for SignedMessage[src]

impl<T> From<Verified<T>> for SignedMessage[src]

impl FromHex for SignedMessage[src]

type Error = Error

impl FromStr for SignedMessage[src]

type Err = Error

The associated error which can be returned from parsing.

impl ObjectHash for SignedMessage[src]

impl Ord for SignedMessage[src]

impl PartialEq<SignedMessage> for SignedMessage[src]

impl PartialOrd<SignedMessage> for SignedMessage[src]

impl ProtobufConvert for SignedMessage[src]

type ProtoStruct = SignedMessage

Type generated from the Protobuf definition.

impl Serialize for SignedMessage[src]

impl StructuralEq for SignedMessage[src]

impl StructuralPartialEq for SignedMessage[src]

impl ToHex for SignedMessage[src]

impl<'_> TryFrom<&'_ SignedMessage> for AnyTx[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ SignedMessage> for Precommit[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<SignedMessage> for CoreMessage[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<SignedMessage> for AnyTx[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<SignedMessage> for Precommit[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

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

impl<T> ToHex for T where
    T: AsRef<[u8]>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,