pub enum ForwardedRoomKeyContent {
MegolmV1AesSha2(Box<ForwardedMegolmV1AesSha2Content>),
Unknown(UnknownRoomKeyContent),
}
Expand description
The m.forwarded_room_key
event content.
This is an enum over the different room key algorithms we support. The
currently-supported implementations are used to share
InboundGroupSession
s.
This event type is used to forward keys for end-to-end encryption. Typically, it is encrypted as an m.room.encrypted event, then sent as a to-device event.
See https://spec.matrix.org/v1.13/client-server-api/#mforwarded_room_key.
Variants§
MegolmV1AesSha2(Box<ForwardedMegolmV1AesSha2Content>)
The m.megolm.v1.aes-sha2
variant of the m.forwarded_room_key
content.
Unknown(UnknownRoomKeyContent)
An unknown and unsupported variant of the m.forwarded_room_key
content.
Implementations§
Source§impl ForwardedRoomKeyContent
impl ForwardedRoomKeyContent
Sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the forwarded room key content.
Trait Implementations§
Source§impl Debug for ForwardedRoomKeyContent
impl Debug for ForwardedRoomKeyContent
Source§impl<'de> Deserialize<'de> for ForwardedRoomKeyContent
impl<'de> Deserialize<'de> for ForwardedRoomKeyContent
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>,
Source§impl EventType for ForwardedRoomKeyContent
impl EventType for ForwardedRoomKeyContent
Source§const EVENT_TYPE: &'static str = "m.forwarded_room_key"
const EVENT_TYPE: &'static str = "m.forwarded_room_key"
Source§fn event_type(&self) -> &str
fn event_type(&self) -> &str
Source§impl Serialize for ForwardedRoomKeyContent
impl Serialize for ForwardedRoomKeyContent
Source§impl TryFrom<ExportedRoomKey> for ForwardedRoomKeyContent
impl TryFrom<ExportedRoomKey> for ForwardedRoomKeyContent
Source§fn try_from(
room_key: ExportedRoomKey,
) -> Result<ForwardedRoomKeyContent, Self::Error>
fn try_from( room_key: ExportedRoomKey, ) -> Result<ForwardedRoomKeyContent, Self::Error>
Convert an exported room key into a content for a forwarded room key event.
This will fail if the exported room key doesn’t contain an Ed25519 claimed sender key.
Source§type Error = SessionExportError
type Error = SessionExportError
Source§impl TryFrom<ForwardedRoomKeyContent> for ExportedRoomKey
impl TryFrom<ForwardedRoomKeyContent> for ExportedRoomKey
Source§fn try_from(forwarded_key: ForwardedRoomKeyContent) -> Result<Self, Self::Error>
fn try_from(forwarded_key: ForwardedRoomKeyContent) -> Result<Self, Self::Error>
Convert the content of a forwarded room key into a exported room key.
Source§type Error = SessionExportError
type Error = SessionExportError
Auto Trait Implementations§
impl Freeze for ForwardedRoomKeyContent
impl RefUnwindSafe for ForwardedRoomKeyContent
impl Send for ForwardedRoomKeyContent
impl Sync for ForwardedRoomKeyContent
impl Unpin for ForwardedRoomKeyContent
impl UnwindSafe for ForwardedRoomKeyContent
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, 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