#[non_exhaustive]pub struct ToDeviceRoomKeyBundleEventContent {
pub room_id: OwnedRoomId,
pub file: EncryptedFile,
}
Expand description
The content of an m.room_key_bundle
event.
Typically encrypted as an m.room.encrypted
event, then sent as a to-device event.
This event is defined in MSC4268
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.room_id: OwnedRoomId
The room that these keys are for.
file: EncryptedFile
The location and encryption info of the key bundle.
Implementations§
Source§impl ToDeviceRoomKeyBundleEventContent
impl ToDeviceRoomKeyBundleEventContent
Sourcepub fn new(room_id: OwnedRoomId, file: EncryptedFile) -> Self
pub fn new(room_id: OwnedRoomId, file: EncryptedFile) -> Self
Creates a new ToDeviceRoomKeyBundleEventContent
with the given room ID, and
EncryptedFile
which contains the room keys from the bundle.
Trait Implementations§
Source§impl Clone for ToDeviceRoomKeyBundleEventContent
impl Clone for ToDeviceRoomKeyBundleEventContent
Source§fn clone(&self) -> ToDeviceRoomKeyBundleEventContent
fn clone(&self) -> ToDeviceRoomKeyBundleEventContent
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<'de> Deserialize<'de> for ToDeviceRoomKeyBundleEventContent
impl<'de> Deserialize<'de> for ToDeviceRoomKeyBundleEventContent
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 From<ToDeviceRoomKeyBundleEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomKeyBundleEventContent> for AnyToDeviceEventContent
Source§fn from(c: ToDeviceRoomKeyBundleEventContent) -> Self
fn from(c: ToDeviceRoomKeyBundleEventContent) -> Self
Converts to this type from the input type.
Source§impl ToDeviceEventContent for ToDeviceRoomKeyBundleEventContent
impl ToDeviceEventContent for ToDeviceRoomKeyBundleEventContent
Source§fn event_type(&self) -> ToDeviceEventType
fn event_type(&self) -> ToDeviceEventType
Get the event’s type, like
m.room_key
.impl JsonCastable<AnyToDeviceEventContent> for ToDeviceRoomKeyBundleEventContent
impl JsonCastable<Map<String, Value>> for ToDeviceRoomKeyBundleEventContent
Auto Trait Implementations§
impl Freeze for ToDeviceRoomKeyBundleEventContent
impl RefUnwindSafe for ToDeviceRoomKeyBundleEventContent
impl Send for ToDeviceRoomKeyBundleEventContent
impl Sync for ToDeviceRoomKeyBundleEventContent
impl Unpin for ToDeviceRoomKeyBundleEventContent
impl UnwindSafe for ToDeviceRoomKeyBundleEventContent
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