serve
Web server configuration (
[serve] table). Web server configuration ([serve] table).Web server configuration ([serve] table).
Web server configuration ([serve] table).
struct Settings
pub struct SettingsSettings from the [serve] configuration table.
| Field | Type | Description |
|---|---|---|
bind_address |
IpAddr | IP address the server should bind to. |
csrf_signing_key |
Option<String> | Hex-encoded 32-byte HMAC key used to sign CSRF cookies. Auto-generated and persisted to the global config file on first startup when absent. Rotating the key invalidates every outstanding CSRF cookie on the next request, which will be reissued transparently. |
debounce_ms |
u64 | File watcher debounce window in milliseconds. |
log_level |
Option<LevelFilter> | Optional log level override applied while gest serve is running. |
open |
bool | Whether to automatically open the browser when the server starts. |
port |
u16 | Port the server should listen on. |
Implements Clone, Debug, Deserialize<'de>, PartialEq, Serialize, Default.
Settings::bind_address
pub fn bind_address(&self) -> IpAddrIP address the server should bind to.
| Parameter | Type | Description |
|---|---|---|
| returns | IpAddr |
Settings::debounce_ms
pub fn debounce_ms(&self) -> u64File watcher debounce window in milliseconds.
| Parameter | Type | Description |
|---|---|---|
| returns | u64 |
Settings::log_level
pub fn log_level(&self) -> Option<LevelFilter>Optional log level override applied while gest serve is running.
| Parameter | Type | Description |
|---|---|---|
| returns | Option<LevelFilter> |
Settings::open
pub fn open(&self) -> boolWhether to automatically open the browser when the server starts.
| Parameter | Type | Description |
|---|---|---|
| returns | bool |
Settings::port
pub fn port(&self) -> u16Port the server should listen on.
| Parameter | Type | Description |
|---|---|---|
| returns | u16 |
Settings::csrf_signing_key
pub fn csrf_signing_key(&self) -> Option<&str>Hex-encoded HMAC signing key used by the CSRF middleware.
| Parameter | Type | Description |
|---|---|---|
| returns | Option<&str> | The configured key, or None before one has been generated and saved. |