pub struct SignalMessage { /* private fields */ }
Expand description
A message with an arbitrary payload.
Implementations§
Source§impl SignalMessage
impl SignalMessage
Sourcepub fn sender_ratchet_key(&self) -> PublicKey
pub fn sender_ratchet_key(&self) -> PublicKey
Get the public half of the sender’s IdentityKeyPair
.
Sourcepub fn message_version(&self) -> u8
pub fn message_version(&self) -> u8
The message format version.
Sourcepub fn verify_mac(
&self,
sender_identity_key: &PublicKey,
receiver_identity_key: &PublicKey,
mac: &[u8],
ctx: &Context,
) -> Result<bool, InternalError>
pub fn verify_mac( &self, sender_identity_key: &PublicKey, receiver_identity_key: &PublicKey, mac: &[u8], ctx: &Context, ) -> Result<bool, InternalError>
Verify the MAC on the signal message.
Trait Implementations§
Source§impl Clone for SignalMessage
impl Clone for SignalMessage
Source§fn clone(&self) -> SignalMessage
fn clone(&self) -> SignalMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SignalMessage
impl Debug for SignalMessage
Source§impl From<SignalMessage> for CiphertextMessage
impl From<SignalMessage> for CiphertextMessage
Source§fn from(other: SignalMessage) -> CiphertextMessage
fn from(other: SignalMessage) -> CiphertextMessage
Converts to this type from the input type.
Source§impl TryFrom<CiphertextMessage> for SignalMessage
impl TryFrom<CiphertextMessage> for SignalMessage
Auto Trait Implementations§
impl Freeze for SignalMessage
impl RefUnwindSafe for SignalMessage
impl !Send for SignalMessage
impl !Sync for SignalMessage
impl Unpin for SignalMessage
impl UnwindSafe for SignalMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more