Struct matrix_sdk_crypto::types::events::ToDeviceEvent
source · [−]pub struct ToDeviceEvent<C>where
C: EventType + Debug + Sized + Serialize,{
pub sender: OwnedUserId,
pub content: C,
/* private fields */
}Expand description
Generic to-device event with a known type and content.
Fields
sender: OwnedUserIdThe sender of the to-device event.
content: CThe content of the to-device event.
Implementations
sourceimpl ToDeviceEvent<ForwardedRoomKeyContent>
impl ToDeviceEvent<ForwardedRoomKeyContent>
sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the forwarded room key.
sourceimpl ToDeviceEvent<ToDeviceEncryptedEventContent>
impl ToDeviceEvent<ToDeviceEncryptedEventContent>
sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the encrypted event content.
sourceimpl ToDeviceEvent<RoomKeyContent>
impl ToDeviceEvent<RoomKeyContent>
sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the room key.
sourceimpl<C: EventType + Debug + Sized + Serialize> ToDeviceEvent<C>
impl<C: EventType + Debug + Sized + Serialize> ToDeviceEvent<C>
sourcepub fn new(sender: OwnedUserId, content: C) -> ToDeviceEvent<C>
pub fn new(sender: OwnedUserId, content: C) -> ToDeviceEvent<C>
Create a new ToDeviceEvent.
Trait Implementations
sourceimpl<'de, C> Deserialize<'de> for ToDeviceEvent<C>where
C: EventType + Debug + Sized + Deserialize<'de> + Serialize,
impl<'de, C> Deserialize<'de> for ToDeviceEvent<C>where
C: EventType + Debug + Sized + Deserialize<'de> + Serialize,
sourcefn 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
Auto Trait Implementations
impl<C> RefUnwindSafe for ToDeviceEvent<C>where
C: RefUnwindSafe,
impl<C> Send for ToDeviceEvent<C>where
C: Send,
impl<C> Sync for ToDeviceEvent<C>where
C: Sync,
impl<C> Unpin for ToDeviceEvent<C>where
C: Unpin,
impl<C> UnwindSafe for ToDeviceEvent<C>where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more