pub struct KeyVerificationRequestEventContent {
pub body: String,
pub formatted: Option<FormattedBody>,
pub methods: Vec<VerificationMethod>,
pub from_device: OwnedDeviceId,
pub to: OwnedUserId,
}
events
only.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,
) -> 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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