Struct ruma_client_api::sync::sync_events::v4::Request
source · pub struct Request {
pub pos: Option<String>,
pub delta_token: Option<String>,
pub txn_id: Option<String>,
pub timeout: Option<Duration>,
pub lists: BTreeMap<String, SyncRequestList>,
pub room_subscriptions: BTreeMap<OwnedRoomId, RoomSubscription>,
pub unsubscribe_rooms: Vec<OwnedRoomId>,
pub extensions: ExtensionsConfig,
}client or server) and crate feature unstable-msc3575 only.Expand description
Request type for the sync endpoint.
Fields§
§pos: Option<String>A point in time to continue a sync from.
Should be a token from the pos field of a previous /sync
response.
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.
txn_id: Option<String>Allows clients to know what request params reached the server, functionally similar to txn IDs on /send for events.
timeout: Option<Duration>The maximum time to poll before responding to this request.
lists: BTreeMap<String, SyncRequestList>The list configurations of rooms we are interested in mapped by name.
room_subscriptions: BTreeMap<OwnedRoomId, RoomSubscription>Specific rooms and event types that we want to receive events from.
unsubscribe_rooms: Vec<OwnedRoomId>Specific rooms we no longer want to receive events from.
extensions: ExtensionsConfigExtensions API.
Implementations§
Trait Implementations§
source§impl IncomingRequest for Request
Available on crate feature server only.
impl IncomingRequest for Request
server only.§type EndpointError = Error
type EndpointError = Error
§type OutgoingResponse = Response
type OutgoingResponse = Response
source§impl OutgoingRequest for Request
Available on crate feature client only.
impl OutgoingRequest for Request
client only.§type EndpointError = Error
type EndpointError = Error
§type IncomingResponse = Response
type IncomingResponse = Response
source§fn try_into_http_request<T: Default + BufMut>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>
fn try_into_http_request<T: Default + BufMut>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>
http::Request. Read moreAuto Trait Implementations§
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
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> OutgoingRequestAppserviceExt for Twhere
T: OutgoingRequest,
impl<T> OutgoingRequestAppserviceExt for Twhere
T: OutgoingRequest,
source§fn try_into_http_request_with_user_id<T>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
user_id: &UserId,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>where
T: Default + BufMut,
fn try_into_http_request_with_user_id<T>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
user_id: &UserId,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>where
T: Default + BufMut,
http::Request and appends a virtual user_id to
assert Appservice identity.