use std::fmt;
use ruma_common::OwnedTransactionId;
use ruma_macros::EventContent;
use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize, EventContent)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[ruma_event(type = "m.secret.send", kind = ToDevice)]
pub struct ToDeviceSecretSendEventContent {
pub request_id: OwnedTransactionId,
pub secret: String,
}
impl ToDeviceSecretSendEventContent {
pub fn new(request_id: OwnedTransactionId, secret: String) -> Self {
Self { request_id, secret }
}
}
impl fmt::Debug for ToDeviceSecretSendEventContent {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("ToDeviceSecretSendEventContent")
.field("request_id", &self.request_id)
.finish_non_exhaustive()
}
}