pub struct RoomSummaryDto {
pub id: String,
pub name: String,
pub env: String,
pub difficulty: String,
pub host: String,
pub starts_at: i64,
pub ends_at: i64,
pub player_count: i64,
pub record_count: i64,
pub results_url: Option<String>,
pub owner_user_id: Option<i64>,
}Expand description
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).
Fields§
§id: String§name: StringRoom display name. Empty for servers/rooms predating it.
env: String§difficulty: String§host: String§starts_at: i64When the room opens for play, epoch seconds UTC. 0 on
servers predating it, treated as “already started”.
ends_at: i64§player_count: i64§record_count: i64§results_url: Option<String>The room’s human-facing results page, built BY THE SERVER from its
own public base URL (env SUPREME_PUBLIC_BASE_URL, falling back to
the request origin). None when the server does not publish one:
the launcher only renders its results icon when this is Some,
it never assembles the URL client-side (the launcher cannot know
how the backend is exposed to browsers).
owner_user_id: Option<i64>The creating account’s user id when the server tracks room
ownership (an account-created room). None on servers/rooms
predating it: ownership then rests on the host name alone (the
guest trust level of the rest of the API). The launcher uses it
to offer removal of rooms “your account owns”.
Implementations§
Source§impl RoomSummaryDto
impl RoomSummaryDto
Sourcepub fn is_live(&self, now: i64) -> bool
pub fn is_live(&self, now: i64) -> bool
RoomDto::is_live for the list entry.
Sourcepub fn is_removable(&self, now: i64) -> bool
pub fn is_removable(&self, now: i64) -> bool
May this room still be removed by its creator: only BEFORE the
room’s start time and while no other player has joined (the
server enforces both guards under its room lock, this is the
launcher’s client-side gate for showing the affordance at all).
A starts_at of 0 (servers predating the field) counts as
already started: an old-style room can never be removed.
Trait Implementations§
Source§impl Clone for RoomSummaryDto
impl Clone for RoomSummaryDto
Source§fn clone(&self) -> RoomSummaryDto
fn clone(&self) -> RoomSummaryDto
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more