Module settings

Source

Re-exportsยง

pub use admin::AdminRecord;
pub use admin::Admins;
pub use banlist::Ban;
pub use banlist::BanEntry;
pub use banlist::BanError;
pub use banlist::BanErrorKind;
pub use banlist::BanInfo;
pub use banlist::BanKind;
pub use banlist::BanOperation;
pub use banlist::BanOperationError;
pub use banlist::BanRecord;
pub use banlist::Banlist;
pub use server_description::ServerDescriptions;
pub use whitelist::Whitelist;
pub use whitelist::WhitelistInfo;
pub use whitelist::WhitelistRecord;

Modulesยง

admin
Versioned admins settings files.
banlist
Versioned banlist settings files.
editable ๐Ÿ”’
server_description
Versioned server description settings files.
server_physics
List of players which are not allowed to use client side physics, to punish abuse
whitelist
Versioned whitelist settings files.

Structsยง

EditableSettings
Combines all the editable settings into one struct that is stored in the ecs
GameplaySettings
ModerationSettings
Settings

Enumsยง

CalendarMode
InvalidSettingsError
Protocol
ServerBattleMode
SettingError
Errors that can occur during edits to a settings file.

Constantsยง

ADMINS_FILENAME ๐Ÿ”’
BANLIST_FILENAME ๐Ÿ”’
CONFIG_DIR ๐Ÿ”’
MIGRATION_UPGRADE_GUARANTEE ๐Ÿ”’
Our upgrade guarantee is that if validation succeeds for an old version, then migration to the next version must always succeed and produce a valid settings file for that version (if we need to change this in the future, it should require careful discussion). Therefore, we would normally panic if the upgrade produced an invalid settings file, which we would perform by doing the following post-validation (example is given for a hypothetical upgrade from Whitelist_V1 to Whitelist_V2):
SERVER_DESCRIPTION_FILENAME ๐Ÿ”’
SERVER_PHYSICS_FORCE_FILENAME ๐Ÿ”’
SETTINGS_FILENAME ๐Ÿ”’
SINGLEPLAYER_SERVER_NAME
WHITELIST_FILENAME ๐Ÿ”’

Traitsยง

EditableSetting

Functionsยง

with_config_dir