Skip to main content

Crate supreme_fs

Crate supreme_fs 

Source

Modules§

auth
Wire DTOs for the tournament account/auth API (the device-link flow).
rooms
Wire DTOs for the Online Tournament rooms API.

Structs§

AccountDto
One account as the auth API returns it. nickname is the in-game display name (the game’s own 1-9 letter rule, mutable); avatar_sha256 doubles as the avatar cache key and the v= param of GameStorage::fetch_auth_avatar (None = no avatar uploaded).
AuthInfo
The auth page location from auth_info: the SERVER’s own URL (it knows how it is exposed to browsers), the launcher never assembles it.
GameStorage
Provides a stateful API for game file management.
OnlineProfileInfo
RoomDto
Full room state as returned by room_create, room_get and room_join.
RoomIdentity
A logged-in account’s identity, attached additively to room actions (user_id + auth_key body fields; None = guest). The server verifies the pair and stamps the account on the room/record; guests keep working unchanged and may not use a registered nickname.
RoomRecordDto
One room record: the best replay .dat of a single player in a room. hash is the CAS sha256 of the uploaded .dat.
RoomSummaryDto
Lightweight room entry as returned by room_list (every room whose ends_at is in the future, including not-yet-started rooms, which the launcher shows as unselectable until they go live).
RoomUploadResult
Result of room_upload_record. accepted: false means the server kept the player’s existing (better or equal) personal best, a successful response, not an error.

Enums§

AssetType
AuthPoll
The auth_poll tri-state.
DiscoverMode
HybridStorageError
Error types for hybrid storage operations
OnlineStorageError
Error types for online storage operations
SnapshotEvent
Event emitted during snapshot operations

Statics§

WINDOWS_1252
The windows-1252 encoding.

Functions§

get_contents_path
Get the contents directory path
get_profiles_path
Get the profiles directory path
get_repository_path
Get the supreme base path (.supreme directory)
high_times_entries_from_records
Render the high-times entries for a room’s records LOCALLY (local fallback for servers predating room_high_times): every valid record (positive time_ticks, non-empty hash), per-player best only, ascending by (time_ticks, player, hash), the same ordering as [supreme_tournament::rank_records] and the server-side renderer, so a fallback file can never disagree with a server-rendered one about rank order.
http_get_bytes
Plain HTTP GET of an absolute URL: returns the response body bytes verbatim. Non-2xx responses are errors carrying the status and the (lossily decoded) body, that keeps a backend error page from ever being stored as file content.
http_get_bytes_opt
Like http_get_bytes, but a 404 answer is Ok(None) instead of an error: the managed-file engine’s mirror semantics treat 404 as “authoritative absence” (the remote file is GONE, remove the local copy) while every other non-2xx stays an error (keep the local file, retry on a later cycle)..
http_post_bytes
Plain HTTP POST of body to an absolute URL (the managed-file engine’s write mirror: when the GAME writes a managed file, the engine posts the new bytes to the file’s own remote URL). The response body is discarded; any non-2xx is an error.