Struct matrix_sdk_crypto::types::events::ToDeviceEvent
source · pub struct ToDeviceEvent<C>{
pub sender: OwnedUserId,
pub content: C,
/* private fields */
}
Expand description
Generic to-device event with a known type and content.
Fields§
§sender: OwnedUserId
The sender of the to-device event.
content: C
The content of the to-device event.
Implementations§
source§impl ToDeviceEvent<ForwardedRoomKeyContent>
impl ToDeviceEvent<ForwardedRoomKeyContent>
sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the forwarded room key.
source§impl ToDeviceEvent<ToDeviceEncryptedEventContent>
impl ToDeviceEvent<ToDeviceEncryptedEventContent>
sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the encrypted event content.
source§impl ToDeviceEvent<RoomKeyContent>
impl ToDeviceEvent<RoomKeyContent>
sourcepub fn algorithm(&self) -> EventEncryptionAlgorithm
pub fn algorithm(&self) -> EventEncryptionAlgorithm
Get the algorithm of the room key.
source§impl<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§
source§impl<C> Debug for ToDeviceEvent<C>
impl<C> Debug for ToDeviceEvent<C>
source§impl<'de, C> Deserialize<'de> for ToDeviceEvent<C>
impl<'de, C> Deserialize<'de> for ToDeviceEvent<C>
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
Auto Trait Implementations§
impl<C> Freeze for ToDeviceEvent<C>where
C: Freeze,
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§
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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