#[non_exhaustive]pub struct DeviceListUpdateContent {
pub user_id: OwnedUserId,
pub device_id: OwnedDeviceId,
pub device_display_name: Option<String>,
pub stream_id: UInt,
pub prev_id: Vec<UInt>,
pub deleted: Option<bool>,
pub keys: Option<Raw<DeviceKeys>>,
}
Available on crate feature
api
and (crate features federation-api-c
or federation-api-s
) only.Expand description
The description of the direct-to- device message.
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.user_id: OwnedUserId
The user ID who owns the device.
device_id: OwnedDeviceId
The ID of the device whose details are changing.
device_display_name: Option<String>
The public human-readable name of this device.
Will be absent if the device has no name.
stream_id: UInt
An ID sent by the server for this update, unique for a given user_id.
prev_id: Vec<UInt>
The stream_ids of any prior m.device_list_update EDUs sent for this user which have not been referred to already in an EDU’s prev_id field.
deleted: Option<bool>
True if the server is announcing that this device has been deleted.
keys: Option<Raw<DeviceKeys>>
The updated identity keys (if any) for this device.
Implementations§
Source§impl DeviceListUpdateContent
impl DeviceListUpdateContent
Sourcepub fn new(
user_id: OwnedUserId,
device_id: OwnedDeviceId,
stream_id: UInt,
) -> DeviceListUpdateContent
pub fn new( user_id: OwnedUserId, device_id: OwnedDeviceId, stream_id: UInt, ) -> DeviceListUpdateContent
Create a new DeviceListUpdateContent
with the given user_id
, device_id
and
stream_id
.
Trait Implementations§
Source§impl Clone for DeviceListUpdateContent
impl Clone for DeviceListUpdateContent
Source§fn clone(&self) -> DeviceListUpdateContent
fn clone(&self) -> DeviceListUpdateContent
Returns a copy 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 DeviceListUpdateContent
impl Debug for DeviceListUpdateContent
Source§impl<'de> Deserialize<'de> for DeviceListUpdateContent
impl<'de> Deserialize<'de> for DeviceListUpdateContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeviceListUpdateContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeviceListUpdateContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DeviceListUpdateContent
impl Serialize for DeviceListUpdateContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DeviceListUpdateContent
impl RefUnwindSafe for DeviceListUpdateContent
impl Send for DeviceListUpdateContent
impl Sync for DeviceListUpdateContent
impl Unpin for DeviceListUpdateContent
impl UnwindSafe for DeviceListUpdateContent
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