pub fn load_and_validate(path: impl AsRef<Path>) -> Result<ServerConfig>Expand description
Load and validate a configuration file without opening any sockets.
Used by both the --check-config flag and the regular startup path. A
successful return guarantees that:
- The file parses as TOML or YAML.
- All schema-level invariants pass (
ServerConfig::validate). - The configured backend kinds for
[auth]and[storage]map onto knownAuthBackendKind/BackendKindvariants.
Network-level reachability checks (e.g. opening an LDAP connection) are intentionally out of scope.