Enum RoomKeyWithheldCodeInfo
#[non_exhaustive]pub enum RoomKeyWithheldCodeInfo {
Blacklisted(Box<RoomKeyWithheldSessionData>),
Unverified(Box<RoomKeyWithheldSessionData>),
Unauthorized(Box<RoomKeyWithheldSessionData>),
Unavailable(Box<RoomKeyWithheldSessionData>),
NoOlm,
}
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§
§impl RoomKeyWithheldCodeInfo
impl RoomKeyWithheldCodeInfo
pub fn code(&self) -> RoomKeyWithheldCode
pub fn code(&self) -> RoomKeyWithheldCode
Get the code of this RoomKeyWithheldCodeInfo
.
Trait Implementations§
§impl Clone for RoomKeyWithheldCodeInfo
impl Clone for RoomKeyWithheldCodeInfo
§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 more§impl Debug for RoomKeyWithheldCodeInfo
impl Debug for RoomKeyWithheldCodeInfo
§impl<'de> Deserialize<'de> for RoomKeyWithheldCodeInfo
impl<'de> Deserialize<'de> for RoomKeyWithheldCodeInfo
§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
§impl Serialize for RoomKeyWithheldCodeInfo
impl Serialize for RoomKeyWithheldCodeInfo
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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