[−][src]Struct exonum::messages::SignedMessage
Protobuf-based container for an arbitrary signed message.
See module documentation for examples.
Fields
payload: Vec<u8>
Payload of the message.
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]
T: TryFrom<Self>,
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]
payload: impl BinaryValue,
author: PublicKey,
secret_key: &SecretKey
) -> Self
Creates a new signed message from the given binary value.
Trait Implementations
impl BinaryValue for SignedMessage
[src]
fn to_bytes(&self) -> Vec<u8>
[src]
fn from_bytes(value: Cow<[u8]>) -> Result<Self, Error>
[src]
fn into_bytes(self) -> Vec<u8>
[src]
impl Clone for SignedMessage
[src]
fn clone(&self) -> SignedMessage
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SignedMessage
[src]
impl<'de> Deserialize<'de> for SignedMessage
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for SignedMessage
[src]
impl Eq for SignedMessage
[src]
impl<T> From<Verified<T>> for SignedMessage
[src]
impl FromHex for SignedMessage
[src]
impl FromStr for SignedMessage
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl ObjectHash for SignedMessage
[src]
fn object_hash(&self) -> Hash
[src]
impl Ord for SignedMessage
[src]
fn cmp(&self, other: &SignedMessage) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<SignedMessage> for SignedMessage
[src]
fn eq(&self, other: &SignedMessage) -> bool
[src]
fn ne(&self, other: &SignedMessage) -> bool
[src]
impl PartialOrd<SignedMessage> for SignedMessage
[src]
fn partial_cmp(&self, other: &SignedMessage) -> Option<Ordering>
[src]
fn lt(&self, other: &SignedMessage) -> bool
[src]
fn le(&self, other: &SignedMessage) -> bool
[src]
fn gt(&self, other: &SignedMessage) -> bool
[src]
fn ge(&self, other: &SignedMessage) -> bool
[src]
impl ProtobufConvert for SignedMessage
[src]
type ProtoStruct = SignedMessage
Type generated from the Protobuf definition.
fn from_pb(pb: Self::ProtoStruct) -> Result<Self, Error>
[src]
fn to_pb(&self) -> Self::ProtoStruct
[src]
impl Serialize for SignedMessage
[src]
impl StructuralEq for SignedMessage
[src]
impl StructuralPartialEq for SignedMessage
[src]
impl ToHex for SignedMessage
[src]
fn encode_hex<T: FromIterator<char>>(&self) -> T
[src]
fn encode_hex_upper<T: FromIterator<char>>(&self) -> T
[src]
impl<'_> TryFrom<&'_ SignedMessage> for AnyTx
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &SignedMessage) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ SignedMessage> for Precommit
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &SignedMessage) -> Result<Self, Self::Error>
[src]
impl TryFrom<SignedMessage> for CoreMessage
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: SignedMessage) -> Result<Self, Self::Error>
[src]
impl TryFrom<SignedMessage> for AnyTx
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: SignedMessage) -> Result<Self, Self::Error>
[src]
impl TryFrom<SignedMessage> for Precommit
[src]
Auto Trait Implementations
impl RefUnwindSafe for SignedMessage
impl Send for SignedMessage
impl Sync for SignedMessage
impl Unpin for SignedMessage
impl UnwindSafe for SignedMessage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,