From: Ian Jackson Date: Sun, 4 Oct 2020 17:36:39 +0000 (+0100) Subject: fix weird doctest failure X-Git-Tag: otter-0.2.0~765 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0bf82f9f00225f29d3a38507ee40243c5ff54e5a;p=otter.git fix weird doctest failure Signed-off-by: Ian Jackson --- diff --git a/src/global.rs b/src/global.rs index 98a750ae..47d800f6 100644 --- a/src/global.rs +++ b/src/global.rs @@ -68,43 +68,43 @@ pub struct Client { pub lastseen : Instant, } -/// KINDS OF PERSISTENT STATE -/// -/// TokenTable TokenTable GameState Instance GameState -/// .players .pieces .pieces -/// -/// Saved No a-* g-* a-* g-* -/// Spec TOML Absent table, ish table game game -/// -/// -/// UPDATE RELIABILITY/PERSISTENCE RULES -/// -/// From the caller's point of view -/// -/// We offer atomic creation/modification/destruction of: -/// -/// * Games (roughtly, a map from InstanceName to GameState; -/// includes any player) -/// -/// * Player access tokens, for an existing (game, player) -/// -/// * Clients (for an existing (game, player) -/// -/// We also offer atomic destruction of: -/// -/// * Games -/// -/// * Players -/// -/// All of the above, except clients, are persistent, in the sense -/// that a server restart will preserve them. See above. -/// -/// The general code gets mutable access to the GameState. We offer -/// post-hoc saving of a modified game. This should not be used for -/// player changes. For other changes, if the save fails, a server -/// restart may be a rewind. This relaxation of the rules is -/// necessary avoid complicated three-phase commit on GameState update -/// for routine game events. +// KINDS OF PERSISTENT STATE +// +// TokenTable TokenTable GameState Instance GameState +// .players .pieces .pieces +// +// Saved No a-* g-* a-* g-* +// Spec TOML Absent table, ish table game game +// +// +// UPDATE RELIABILITY/PERSISTENCE RULES +// +// From the caller's point of view +// +// We offer atomic creation/modification/destruction of: +// +// * Games (roughtly, a map from InstanceName to GameState; +// includes any player) +// +// * Player access tokens, for an existing (game, player) +// +// * Clients (for an existing (game, player) +// +// We also offer atomic destruction of: +// +// * Games +// +// * Players +// +// All of the above, except clients, are persistent, in the sense +// that a server restart will preserve them. See above. +// +// The general code gets mutable access to the GameState. We offer +// post-hoc saving of a modified game. This should not be used for +// player changes. For other changes, if the save fails, a server +// restart may be a rewind. This relaxation of the rules is +// necessary avoid complicated three-phase commit on GameState update +// for routine game events. // // IMPLEMENTATION //