Struct matrix_sdk_base::sliding_sync::http::msc3575::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>(
response: Response<T>,
) -> Result<Response, FromHttpResponseError<Error>>
fn try_from_http_response<T>( response: Response<T>, ) -> Result<Response, 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
)source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more