pub struct Config {Show 29 fields
pub database_url: String,
pub listen_database_url: Option<String>,
pub site_schema: String,
pub schema: String,
pub pool_size: usize,
pub public_url: String,
pub site_url: String,
pub esports_login: bool,
pub site_name: String,
pub bind: String,
pub metrics_bind: String,
pub lag_comp_ms: i64,
pub challenge_ttl_secs: u64,
pub first_move_secs: u64,
pub gone_after_secs: u64,
pub claim_win_secs: u64,
pub public_delay_plies: usize,
pub fairplay: bool,
pub block_marked: bool,
pub sweep_ms: u64,
pub vision_endpoint: String,
pub vision_model: String,
pub vision_api_key: Option<String>,
pub vision_local_model: String,
pub vision_min_confidence: f32,
pub vision_review: bool,
pub vision_review_max: i64,
pub tablebase_url: String,
pub app_dir: Option<String>,
}Fields§
§database_url: StringPostgres URL: the site’s Neon database. A pooled (-pooler) host is
fine; notifications use the direct host automatically.
listen_database_url: Option<String>A separate URL for LISTEN, if the direct host can’t be derived.
site_schema: StringThe site’s schema (players, API tokens, sessions).
schema: StringThis server’s own schema (games, challenges, ratings, fair play).
pool_size: usize§public_url: StringWhere clients reach this server, including any path prefix
(https://chess.example.com). Used in game URLs and
to mount the API under the prefix.
site_url: StringThe site whose players and sign-ins this server uses, for “sign in first” links on the OAuth page.
esports_login: boolSign in through the host site (esports-lab): the OAuth page accepts
the site’s session cookie and links to its sign-in. Off by default,
so a server without that site offers no browser sign-in; API
tokens (the site’s, and open-chess bot create) work either way.
site_name: StringWhat players know the site as: on the OAuth page, in PGN event
names and in GET / (which the training app shows).
bind: String§metrics_bind: String/metrics, /healthz and /readyz.
lag_comp_ms: i64Milliseconds given back per move for the network round trip.
challenge_ttl_secs: u64A real-time challenge lapses after this many seconds unless the
challenger keeps a keepAliveStream open.
first_move_secs: u64Each side’s first move must come within this many seconds or the game is aborted.
gone_after_secs: u64A player with no open game stream for this long is “gone”.
claim_win_secs: u64Then the opponent may claim the win after this many more seconds.
public_delay_plies: usizeThe public move stream runs this many plies behind a live game, so it can’t feed an engine helping a player.
fairplay: boolQueue human players’ finished games for fair-play analysis.
block_marked: boolAccounts marked for engine use can’t start new games.
sweep_ms: u64How often the clock sweeper looks for flags and lapsed challenges.
vision_endpoint: StringReading boards from photos: base URL of a vision model behind an
OpenAI-style /chat/completions (Claude via
https://api.anthropic.com/v1, Qwen-VL via Ollama’s
http://localhost:11434/v1, or a gateway). Empty: photo reading is
off.
vision_model: StringThe vision model’s name as that server knows it.
vision_api_key: Option<String>Bearer token for the vision server, if it needs one.
vision_local_model: StringOur own board reader (chess-vision): a .safetensors weights file
from chess-vision-train. It reads photos first, on this
server’s CPU; the vision model at CHESS_VISION_ENDPOINT (if set) is
only asked about photos it isn’t sure of. Empty: not used.
vision_min_confidence: f32The board reader’s answer is used without review when every square is above its unsure threshold and the chance that all 64 are right is at least this.
vision_review: boolKeep photos that couldn’t be read for sure for the Review page,
where a person confirms the position; confirmed photos become
training data (open-chess photos export). Players are told.
vision_review_max: i64At most this many photos wait for review; beyond it, new ones aren’t kept.
tablebase_url: StringWhere exact endgame results (up to seven pieces) come from: a Lichess-compatible tablebase server. Answers are kept in the database, so each position is fetched once. Empty: off.
app_dir: Option<String>The built training app (web/chess plus its wasm engine), served at
/app/. The chess image puts it at /usr/share/open-chess/app.
Implementations§
Trait Implementations§
Source§impl Args for Config
impl Args for Config
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for Config
impl FromArgMatches for Config
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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