Struct rtj::Message [−][src]
Fields
header: Header
payload: Vec<u8>
Implementations
Sets the Message
header field
This method can only be called after Message::set_payload
as the header itself contains the size of the payload in bytes.
Public key bytes to be sent in the Header
must be the public
part of the sender’s SecretKey
.
Encrypts and resets the Message
payload field using the specified PublicKey
of the recipient and SecretKey
of the sender.
The Header
is updated to:
- Reflect the new payload length
- Set the encrypted flag
Payload is encrypted for the given pubkey.
Encryption is done using crypto_box
in its default configuration.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Message
impl UnwindSafe for Message
Blanket Implementations
Mutably borrows from an owned value. Read more