Struct ruma::events::key::verification::mac::ToDeviceKeyVerificationMacEventContent
source · [−]pub struct ToDeviceKeyVerificationMacEventContent {
pub transaction_id: OwnedTransactionId,
pub mac: BTreeMap<String, Base64<Standard, Vec<u8, Global>>, Global>,
pub keys: Base64<Standard, Vec<u8, Global>>,
}
Available on crate feature
events
only.Expand description
The content of a to-device m.key.verification.
event.
Sends the MAC of a device’s key to the partner device.
Fields
transaction_id: OwnedTransactionId
An opaque identifier for the verification process.
Must be the same as the one used for the m.key.verification.start
message.
mac: BTreeMap<String, Base64<Standard, Vec<u8, Global>>, Global>
A map of the key ID to the MAC of the key, using the algorithm in the verification process.
The MAC is encoded as unpadded base64.
keys: Base64<Standard, Vec<u8, Global>>
The MAC of the comma-separated, sorted, list of key IDs given in the mac
property,
encoded as unpadded base64.
Implementations
sourceimpl ToDeviceKeyVerificationMacEventContent
impl ToDeviceKeyVerificationMacEventContent
sourcepub fn new(
transaction_id: OwnedTransactionId,
mac: BTreeMap<String, Base64<Standard, Vec<u8, Global>>, Global>,
keys: Base64<Standard, Vec<u8, Global>>
) -> ToDeviceKeyVerificationMacEventContent
pub fn new(
transaction_id: OwnedTransactionId,
mac: BTreeMap<String, Base64<Standard, Vec<u8, Global>>, Global>,
keys: Base64<Standard, Vec<u8, Global>>
) -> ToDeviceKeyVerificationMacEventContent
Creates a new ToDeviceKeyVerificationMacEventContent
with the given transaction ID, key ID
to MAC map and key MAC.
Trait Implementations
sourceimpl Clone for ToDeviceKeyVerificationMacEventContent
impl Clone for ToDeviceKeyVerificationMacEventContent
sourcefn clone(&self) -> ToDeviceKeyVerificationMacEventContent
fn clone(&self) -> ToDeviceKeyVerificationMacEventContent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'de> Deserialize<'de> for ToDeviceKeyVerificationMacEventContent
impl<'de> Deserialize<'de> for ToDeviceKeyVerificationMacEventContent
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<ToDeviceKeyVerificationMacEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ToDeviceKeyVerificationMacEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl EventContent for ToDeviceKeyVerificationMacEventContent
impl EventContent for ToDeviceKeyVerificationMacEventContent
type EventType = ToDeviceEventType
type EventType = ToDeviceEventType
The Rust enum for the event kind’s known types.
sourcefn event_type(
&self
) -> <ToDeviceKeyVerificationMacEventContent as EventContent>::EventType
fn event_type(
&self
) -> <ToDeviceKeyVerificationMacEventContent as EventContent>::EventType
Get the event’s type, like
m.room.message
.sourceimpl From<ToDeviceKeyVerificationMacEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationMacEventContent> for AnyToDeviceEventContent
sourcefn from(c: ToDeviceKeyVerificationMacEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationMacEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
sourceimpl Serialize for ToDeviceKeyVerificationMacEventContent
impl Serialize for ToDeviceKeyVerificationMacEventContent
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl ToDeviceEventContent for ToDeviceKeyVerificationMacEventContent
Auto Trait Implementations
impl RefUnwindSafe for ToDeviceKeyVerificationMacEventContent
impl Send for ToDeviceKeyVerificationMacEventContent
impl Sync for ToDeviceKeyVerificationMacEventContent
impl Unpin for ToDeviceKeyVerificationMacEventContent
impl UnwindSafe for ToDeviceKeyVerificationMacEventContent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more