Struct matrix_sdk_crypto::ToDeviceRequest [−][src]
pub struct ToDeviceRequest { pub event_type: EventType, pub txn_id: Uuid, pub messages: BTreeMap<UserId, BTreeMap<DeviceIdOrAllDevices, Raw<AnyToDeviceEventContent>>>, }
Expand description
Customized version of
ruma_client_api::r0::to_device::send_event_to_device::Request
,
using a UUID for the transaction ID.
Fields
event_type: EventType
Type of event being sent to each device.
txn_id: Uuid
A request identifier unique to the access token used to send the request.
messages: BTreeMap<UserId, BTreeMap<DeviceIdOrAllDevices, Raw<AnyToDeviceEventContent>>>
A map of users to devices to a content for a message event to be
sent to the user’s device. Individual message events can be sent
to devices, but all events must be of the same type.
The content’s type for this field will be updated in a future
release, until then you can create a value using
serde_json::value::to_raw_value
.
Implementations
Gets the transaction ID as a string.
Get the number of unique messages this request contains.
Note: A single message may be sent to multiple devices, so this may or may not be the number of devices that will receive the messages as well.
Trait Implementations
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
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for ToDeviceRequest
impl Send for ToDeviceRequest
impl Sync for ToDeviceRequest
impl Unpin for ToDeviceRequest
impl UnwindSafe for ToDeviceRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self