Struct ruma_client_api::sync::sync_events::v4::Response
source · 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>,
}
client
or server
) and crate feature unstable-msc3575
only.Expand description
Response type for the sync
endpoint.
Fields§
§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
Available on crate feature client
only.
impl IncomingResponse for Response
client
only.source§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.source§impl OutgoingResponse for Response
Available on crate feature server
only.
impl OutgoingResponse for Response
server
only.source§fn try_into_http_response<T: Default + BufMut>(
self,
) -> Result<Response<T>, IntoHttpError>
fn try_into_http_response<T: Default + BufMut>( self, ) -> Result<Response<T>, IntoHttpError>
http::Response
. Read moreAuto 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)