Parent
[>]
1//! Global application configuration set once at startup. 2//! 3//! Values are stored in `OnceLock` statics and accessed via the corresponding 4//! getter functions. All setters accept `Option` and silently skip `None`. 5 6use OnceLock; 7 8/// Package name read from `Cargo.toml` at compile time. 9pub const PKG_NAME: &str = env!; 10 11/// Package version read from `Cargo.toml` at compile time. 12pub const PKG_VERSION: &str = env!; 13 14static HOSTNAME: = new; 15static SSH_PREFIX: = new; 16static BASE_URL: = new; 17static FAVICON: = new; 18 19/// Returns the configured hostname, or `"index"` if none was provided. 20 23 24/// Returns the configured SSH prefix, or an empty string if none was provided. 25 28 29/// Returns the configured base URL path prefix, or an empty string if none was 30/// provided. 31 34 35/// Returns the favicon bytes loaded at startup. 36 39 40/// Sets the hostname shown in breadcrumbs and clone URLs. 41/// Silently skips `None`. 42 47 48/// Sets the path prefix used in SSH clone URLs. Silently skips `None`. 49 54 55/// Sets the URL path prefix for reverse-proxy deployments. 56/// Silently skips `None`. 57 62 63/// Sets the favicon bytes served at `/favicon.ico`. 64