#[non_exhaustive]pub struct AnyAppserviceToDeviceEvent {
pub event: AnyToDeviceEvent,
pub to_user_id: OwnedUserId,
pub to_device_id: OwnedDeviceId,
}Available on crate feature
api and (crate features appservice-api-c or appservice-api-s) and crate feature unstable-msc4203 only.Expand description
An event sent using send-to-device messaging with additional fields when pushed to an application service.
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.event: AnyToDeviceEventThe to-device event.
to_user_id: OwnedUserIdThe fully-qualified user ID of the intended recipient.
to_device_id: OwnedDeviceIdThe device ID of the intended recipient.
Implementations§
Source§impl AnyAppserviceToDeviceEvent
impl AnyAppserviceToDeviceEvent
Sourcepub fn new(
event: AnyToDeviceEvent,
to_user_id: OwnedUserId,
to_device_id: OwnedDeviceId,
) -> AnyAppserviceToDeviceEvent
pub fn new( event: AnyToDeviceEvent, to_user_id: OwnedUserId, to_device_id: OwnedDeviceId, ) -> AnyAppserviceToDeviceEvent
Construct a new AnyAppserviceToDeviceEvent with the given event and recipient
information.
Sourcepub fn event_type(&self) -> ToDeviceEventType
pub fn event_type(&self) -> ToDeviceEventType
The event type of the to-device event.
Sourcepub fn content(&self) -> AnyToDeviceEventContent
pub fn content(&self) -> AnyToDeviceEventContent
The content of the to-device event.
Trait Implementations§
Source§impl Clone for AnyAppserviceToDeviceEvent
impl Clone for AnyAppserviceToDeviceEvent
Source§fn clone(&self) -> AnyAppserviceToDeviceEvent
fn clone(&self) -> AnyAppserviceToDeviceEvent
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 Debug for AnyAppserviceToDeviceEvent
impl Debug for AnyAppserviceToDeviceEvent
Source§impl<'de> Deserialize<'de> for AnyAppserviceToDeviceEvent
impl<'de> Deserialize<'de> for AnyAppserviceToDeviceEvent
Source§fn deserialize<D>(
deserializer: D,
) -> Result<AnyAppserviceToDeviceEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<AnyAppserviceToDeviceEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl JsonCastable<AnyToDeviceEvent> for AnyAppserviceToDeviceEvent
impl JsonCastable<Map<String, Value>> for AnyAppserviceToDeviceEvent
Auto Trait Implementations§
impl Freeze for AnyAppserviceToDeviceEvent
impl RefUnwindSafe for AnyAppserviceToDeviceEvent
impl Send for AnyAppserviceToDeviceEvent
impl Sync for AnyAppserviceToDeviceEvent
impl Unpin for AnyAppserviceToDeviceEvent
impl UnwindSafe for AnyAppserviceToDeviceEvent
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