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,
§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