pub struct KeyVerificationRequestEventContent {
pub body: String,
pub formatted: Option<FormattedBody>,
pub methods: Vec<VerificationMethod>,
pub from_device: OwnedDeviceId,
pub to: OwnedUserId,
}
Expand description
The payload for a key verification request message.
Fields§
§body: String
A fallback message to alert users that their client does not support the key verification framework.
Clients that do support the key verification framework should hide the body and instead present the user with an interface to accept or reject the key verification.
formatted: Option<FormattedBody>
Formatted form of the body
.
As with the body
, clients that do support the key verification framework should hide the
formatted body and instead present the user with an interface to accept or reject the key
verification.
methods: Vec<VerificationMethod>
The verification methods supported by the sender.
from_device: OwnedDeviceId
The device ID which is initiating the request.
to: OwnedUserId
The user ID which should receive the request.
Users should only respond to verification requests if they are named in this field. Users
who are not named in this field and who did not send this event should ignore all other
events that have a m.reference
relationship with this event.
Implementations§
source§impl KeyVerificationRequestEventContent
impl KeyVerificationRequestEventContent
sourcepub fn new(
body: String,
methods: Vec<VerificationMethod>,
from_device: OwnedDeviceId,
to: OwnedUserId,
) -> Self
pub fn new( body: String, methods: Vec<VerificationMethod>, from_device: OwnedDeviceId, to: OwnedUserId, ) -> Self
Creates a new KeyVerificationRequestEventContent
with the given body, method, device
and user ID.
Trait Implementations§
source§impl Clone for KeyVerificationRequestEventContent
impl Clone for KeyVerificationRequestEventContent
source§fn clone(&self) -> KeyVerificationRequestEventContent
fn clone(&self) -> KeyVerificationRequestEventContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'de> Deserialize<'de> for KeyVerificationRequestEventContent
impl<'de> Deserialize<'de> for KeyVerificationRequestEventContent
source§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>,
Auto Trait Implementations§
impl Freeze for KeyVerificationRequestEventContent
impl RefUnwindSafe for KeyVerificationRequestEventContent
impl Send for KeyVerificationRequestEventContent
impl Sync for KeyVerificationRequestEventContent
impl Unpin for KeyVerificationRequestEventContent
impl UnwindSafe for KeyVerificationRequestEventContent
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)