#[non_exhaustive]pub enum RoomKeyWithheldCodeInfo {
Blacklisted(Box<RoomKeyWithheldSessionData>),
Unverified(Box<RoomKeyWithheldSessionData>),
Unauthorized(Box<RoomKeyWithheldSessionData>),
Unavailable(Box<RoomKeyWithheldSessionData>),
NoOlm,
}
Available on crate feature
events
only.Expand description
The possible codes for why a megolm key was not sent, and the associated session data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Blacklisted(Box<RoomKeyWithheldSessionData>)
m.blacklisted
The user or device was blacklisted.
Unverified(Box<RoomKeyWithheldSessionData>)
m.unverified
The user or device was not verified, and the sender is only sharing keys with verified users or devices.
m.unauthorised
The user or device is not allowed to have the key. For example, this could be sent in response to a key request if the user or device was not in the room when the original message was sent.
m.unavailable
Sent in reply to a key request if the device that the key is requested from does not have the requested key.
NoOlm
m.no_olm
An olm session could not be established.
Implementations§
Source§impl RoomKeyWithheldCodeInfo
impl RoomKeyWithheldCodeInfo
Sourcepub fn code(&self) -> RoomKeyWithheldCode
pub fn code(&self) -> RoomKeyWithheldCode
Get the code of this RoomKeyWithheldCodeInfo
.
Trait Implementations§
Source§impl Clone for RoomKeyWithheldCodeInfo
impl Clone for RoomKeyWithheldCodeInfo
Source§fn clone(&self) -> RoomKeyWithheldCodeInfo
fn clone(&self) -> RoomKeyWithheldCodeInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RoomKeyWithheldCodeInfo
impl Debug for RoomKeyWithheldCodeInfo
Source§impl<'de> Deserialize<'de> for RoomKeyWithheldCodeInfo
impl<'de> Deserialize<'de> for RoomKeyWithheldCodeInfo
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RoomKeyWithheldCodeInfo, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RoomKeyWithheldCodeInfo, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RoomKeyWithheldCodeInfo
impl Serialize for RoomKeyWithheldCodeInfo
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RoomKeyWithheldCodeInfo
impl RefUnwindSafe for RoomKeyWithheldCodeInfo
impl Send for RoomKeyWithheldCodeInfo
impl Sync for RoomKeyWithheldCodeInfo
impl Unpin for RoomKeyWithheldCodeInfo
impl UnwindSafe for RoomKeyWithheldCodeInfo
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
Mutably borrows from an owned value. Read more