pub struct TournamentSelection {
pub room_id: String,
pub name: String,
pub env: String,
pub difficulty: String,
pub starts_at: i64,
pub ends_at: i64,
pub player: String,
}Expand description
One mod’s current tournament selection, read from its active
configuration. None when no room is selected (tournament_room_id
empty or absent).
Fields§
§room_id: StringServer-generated room id (r_ + 12 hex). Never user-facing
: the UI shows Self::name instead.
name: StringRoom display name (server-side, snowboarding words when the creator left it empty). Empty for rooms made by older servers.
env: StringSelected environment, one of alpine, forest, village.
difficulty: StringSelected difficulty, one of easy, medium, hard.
starts_at: i64When the room opens for play, epoch seconds (UTC). 0 = unknown
(an older launcher’s selection), treated as already started.
ends_at: i64When the room closes, epoch seconds (UTC).
player: StringPlayer name as the game writes it (matches the in-.dat name and
Saved_Data/Arcade_Player.txt).
Implementations§
Source§impl TournamentSelection
impl TournamentSelection
Sourcepub fn from_configuration(config: &HashMap<String, Value>) -> Option<Self>
pub fn from_configuration(config: &HashMap<String, Value>) -> Option<Self>
Reads a selection out of one mod’s configuration map (the values
the launcher persists, overrides merged over the mod’s defaults,
exactly what the hook resolver interpolates). None when no room
is selected.
Sourcepub fn is_playable(&self, now: i64) -> bool
pub fn is_playable(&self, now: i64) -> bool
play gate: the game may start into this room only while it is live, started (or of unknown start, an old selection) AND not expired. A previously selected but expired room, and a scheduled room that has not started yet, both keep the Play (Online) button disabled.
Sourcepub fn play_blocker(&self, now: i64) -> Option<String>
pub fn play_blocker(&self, now: i64) -> Option<String>
WHY the selection is not playable right now, the play button’s
tooltip. None when it is playable.
Trait Implementations§
Source§impl Clone for TournamentSelection
impl Clone for TournamentSelection
Source§fn clone(&self) -> TournamentSelection
fn clone(&self) -> TournamentSelection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TournamentSelection
impl Debug for TournamentSelection
Source§impl PartialEq for TournamentSelection
impl PartialEq for TournamentSelection
Source§fn eq(&self, other: &TournamentSelection) -> bool
fn eq(&self, other: &TournamentSelection) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TournamentSelection
Auto Trait Implementations§
impl Freeze for TournamentSelection
impl RefUnwindSafe for TournamentSelection
impl Send for TournamentSelection
impl Sync for TournamentSelection
impl Unpin for TournamentSelection
impl UnsafeUnpin for TournamentSelection
impl UnwindSafe for TournamentSelection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more