Struct ruma::api::client::sync::sync_events::v4::IncomingRequest
source · [−]pub struct IncomingRequest {
pub pos: Option<String>,
pub txn_id: Option<String>,
pub timeout: Option<Duration>,
pub lists: Vec<SyncRequestList, Global>,
pub room_subscriptions: BTreeMap<OwnedRoomId, RoomSubscription, Global>,
pub unsubscribe_rooms: Vec<OwnedRoomId, Global>,
pub extensions: ExtensionsConfig,
}
Available on (crate features
client-api-c
or client-api-s
) and (crate features client
or server
) and crate feature api
and crate feature unstable-msc3575
only.Expand description
‘Incoming’ variant of Request.
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.
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: Vec<SyncRequestList, Global>
The lists of rooms we’re interested in.
room_subscriptions: BTreeMap<OwnedRoomId, RoomSubscription, Global>
Specific rooms and event types that we want to receive events from.
unsubscribe_rooms: Vec<OwnedRoomId, Global>
Specific rooms we no longer want to receive events from.
extensions: ExtensionsConfig
Extensions API.
Trait Implementations
sourceimpl Debug for IncomingRequest
impl Debug for IncomingRequest
sourceimpl IncomingRequest for IncomingRequest
Available on crate feature server
only.
impl IncomingRequest for IncomingRequest
Available on crate feature
server
only.type EndpointError = Error
type EndpointError = Error
A type capturing the error conditions that can be returned in the response.
type OutgoingResponse = Response
type OutgoingResponse = Response
Response type to return when the request is successful.
sourcefn try_from_http_request<B, S>(
request: Request<B>,
path_args: &[S]
) -> Result<IncomingRequest, FromHttpRequestError>where
B: AsRef<[u8]>,
S: AsRef<str>,
fn try_from_http_request<B, S>(
request: Request<B>,
path_args: &[S]
) -> Result<IncomingRequest, FromHttpRequestError>where
B: AsRef<[u8]>,
S: AsRef<str>,
Tries to turn the given
http::Request
into this request type,
together with the corresponding path arguments. Read moreAuto Trait Implementations
impl RefUnwindSafe for IncomingRequest
impl Send for IncomingRequest
impl Sync for IncomingRequest
impl Unpin for IncomingRequest
impl UnwindSafe for IncomingRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more