Struct libp2p::core::signed_envelope::SignedEnvelope [−][src]
pub struct SignedEnvelope { /* fields omitted */ }
Expand description
A signed envelope contains an arbitrary byte string payload, a signature of the payload, and the public key that can be used to verify the signature.
For more details see libp2p RFC0002: https://github.com/libp2p/specs/blob/master/RFC/0002-signed-envelopes.md
Implementations
Constructs a new SignedEnvelope
.
Verify this SignedEnvelope
against the provided domain-separation string.
Extract the payload of this SignedEnvelope
.
You must provide the correct domain-separation string and expected payload type in order to get the payload. This guards against accidental mis-use of the payload where the signature was created for a different purpose or payload type.
Encode this SignedEnvelope
using the protobuf encoding specified in the RFC.
Decode a SignedEnvelope
using the protobuf encoding specified in the RFC.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SignedEnvelope
impl Send for SignedEnvelope
impl Sync for SignedEnvelope
impl Unpin for SignedEnvelope
impl UnwindSafe for SignedEnvelope
Blanket Implementations
Mutably borrows from an owned value. Read more