Skip to main content

Module matrix

Module matrix 

Source
Expand description

Matrix homeserver, client-server API v3. Rust owns HTTP, the API’s JSON shapes, access tokens, room membership and per-user /sync delivery (hub.rs); the handler decides logins (unless user_passwords is given), room creation, joins and every message, and speaks in rooms as its own user.

Modules§

actions
What the model decides as a Matrix homeserver: who may log in (when no user_passwords table is given), whether a room may be created or joined, whether a message is accepted — and what it says back, as its own user, into any room. Rust owns the client-server API’s shapes, tokens, room membership and /sync delivery.
hub
The homeserver’s protocol state: access tokens, rooms and their members, and per-user delivery queues for /sync. This is transport state — what a homeserver must hold to hand one client’s events to another — not a store: what a room says comes from the clients and the model, and nothing outlives the server.

Constants§

BODY_TIMEOUT
HEADER_TIMEOUT
MAX_HEADERS
MAX_HEADER_BYTES
MAX_PAGE
/messages returns at most this many events per page.
MAX_SYNC_WAIT
The longest a /sync waits for something new, whatever timeout the client asks for.
MAX_TXNS
Transaction ids remembered for idempotent sends.

Functions§

spawn