pub enum RoomKeyContent {
MegolmV1AesSha2(Box<MegolmV1AesSha2Content>),
Unknown(UnknownRoomKey),
}
Expand description
The m.room_key
event content.
This is an enum over the different room key algorithms we support.
This event type is used to exchange keys for end-to-end encryption. Typically it is encrypted as an m.room.encrypted event, then sent as a to-device event.
Variants§
MegolmV1AesSha2(Box<MegolmV1AesSha2Content>)
The m.megolm.v1.aes-sha2
variant of the m.room_key
content.
Unknown(UnknownRoomKey)
An unknown and unsupported variant of the m.room_key
content.
Implementations§
Source§impl RoomKeyContent
impl RoomKeyContent
Sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the room key.
Trait Implementations§
Source§impl Debug for RoomKeyContent
impl Debug for RoomKeyContent
Source§impl<'de> Deserialize<'de> for RoomKeyContent
impl<'de> Deserialize<'de> for RoomKeyContent
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EventType for RoomKeyContent
impl EventType for RoomKeyContent
Source§const EVENT_TYPE: &'static str = "m.room_key"
const EVENT_TYPE: &'static str = "m.room_key"
The event type of the event content.
Source§fn event_type(&self) -> &'static str
fn event_type(&self) -> &'static str
Get the event type of the event content. Read more
Auto Trait Implementations§
impl Freeze for RoomKeyContent
impl RefUnwindSafe for RoomKeyContent
impl Send for RoomKeyContent
impl Sync for RoomKeyContent
impl Unpin for RoomKeyContent
impl UnwindSafe for RoomKeyContent
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, 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>
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