Struct ruma_client_api::sync::sync_events::v4::Response
source · #[non_exhaustive]pub struct Response {
pub initial: bool,
pub txn_id: Option<String>,
pub pos: String,
pub lists: BTreeMap<String, SyncList>,
pub rooms: BTreeMap<OwnedRoomId, SlidingSyncRoom>,
pub extensions: Extensions,
pub delta_token: Option<String>,
}
Expand description
Response type for the sync
endpoint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.initial: bool
Whether this response describes an initial sync (i.e. after the pos
token has been
discard by the server?).
txn_id: Option<String>
Matches the txn_id
sent by the request. Please see Request::txn_id
.
pos: String
The token to supply in the pos
param of the next /sync
request.
lists: BTreeMap<String, SyncList>
Updates on the order of rooms, mapped by the names we asked for.
rooms: BTreeMap<OwnedRoomId, SlidingSyncRoom>
The updates on rooms.
extensions: Extensions
Extensions API.
delta_token: Option<String>
The delta token to store for session recovery.
The delta token is a future bandwidth optimisation to resume from an earlier session. If you received a delta token in your last response you can persist and it when establishing a new sessions to “resume” from the last state and not resend information you had stored. If you send a delta token, the server expects you to have stored the last state, if there is no delta token present the server will resend all information necessary to calculate the state.
Please consult “Bandwidth optimisations for persistent clients” of the MSC for further details, expectations of the implementation and limitations to consider before implementing this.
Implementations§
Trait Implementations§
source§impl IncomingResponse for Response
impl IncomingResponse for Response
§type EndpointError = Error
type EndpointError = Error
source§fn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>,
) -> Result<Self, FromHttpResponseError<Error>>
fn try_from_http_response<T: AsRef<[u8]>>( response: Response<T>, ) -> Result<Self, FromHttpResponseError<Error>>
http::Response
into this response type.Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)