pub struct SyncResponse {
pub next_batch: String,
pub rooms: RoomsSection,
pub account_data: AccountDataSection,
pub to_device: ToDeviceSection,
pub device_lists: DeviceListsSection,
pub device_one_time_keys_count: BTreeMap<String, u64>,
pub device_unused_fallback_key_types: Vec<String>,
}Expand description
A parsed GET /sync response (research doc §1.4). See the module doc
for why every field but next_batch is defaulted.
Fields§
§next_batch: StringThe cursor to pass as since on the next call.
rooms: RoomsSectionRooms this account has any relationship with.
account_data: AccountDataSectionGlobal (not room-scoped) account data.
to_device: ToDeviceSectionTo-device events delivered to this device.
device_lists: DeviceListsSectionDevice-list change notifications for users sharing a room with this account.
device_one_time_keys_count: BTreeMap<String, u64>Remaining one-time-key count per algorithm (research doc §3.2) —
keyed by algorithm name (e.g. "signed_curve25519").
device_unused_fallback_key_types: Vec<String>Fallback-key algorithms this device has published that the server has not yet consumed one of (research doc §3.2) — a non-empty entry here means “unused”, an empty list means “top one up”.
Trait Implementations§
Source§impl Clone for SyncResponse
impl Clone for SyncResponse
Source§impl Debug for SyncResponse
impl Debug for SyncResponse
Source§impl Default for SyncResponse
impl Default for SyncResponse
Source§impl<'de> Deserialize<'de> for SyncResponse
impl<'de> Deserialize<'de> for SyncResponse
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
Source§impl PartialEq for SyncResponse
impl PartialEq for SyncResponse
Source§impl Serialize for SyncResponse
impl Serialize for SyncResponse
impl StructuralPartialEq for SyncResponse
Auto Trait Implementations§
impl Freeze for SyncResponse
impl RefUnwindSafe for SyncResponse
impl Send for SyncResponse
impl Sync for SyncResponse
impl Unpin for SyncResponse
impl UnsafeUnpin for SyncResponse
impl UnwindSafe for SyncResponse
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