#[non_exhaustive]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 (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.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,
) -> KeyVerificationRequestEventContent
pub fn new( body: String, methods: Vec<VerificationMethod>, from_device: OwnedDeviceId, to: OwnedUserId, ) -> KeyVerificationRequestEventContent
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<KeyVerificationRequestEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyVerificationRequestEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for KeyVerificationRequestEventContent
impl Serialize for KeyVerificationRequestEventContent
Source§fn 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,
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§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more