pub struct UnifiConfig {
pub url: String,
pub api_key: String,
pub site: String,
pub skip_tls_verify: bool,
pub legacy: bool,
pub request_timeout: Duration,
}Expand description
UniFi controller connection config.
Debug redacts api_key so this can’t leak into logs or
traces through an incidental {:?} — only its length is shown.
Fields§
§url: StringController base URL, e.g. https://unifi.local (UNIFI_URL).
api_key: StringAPI key for the X-API-KEY header (UNIFI_API_KEY).
site: StringSite name (UNIFI_SITE, default "default").
skip_tls_verify: boolSkip TLS certificate verification. Defaults to false (verify) —
self-signed local UniFi controllers need this explicitly set to
true; a client should never silently accept invalid certificates.
legacy: boolLegacy controller mode: no /proxy/network prefix, typically port 8443.
request_timeout: DurationPer-request timeout, applied to the pooled reqwest::Client at
construction. Defaults to DEFAULT_REQUEST_TIMEOUT; override for
controllers or actions (large exports, slow WAN links) that
routinely need longer than 30s.
Trait Implementations§
Source§impl Clone for UnifiConfig
impl Clone for UnifiConfig
Source§fn clone(&self) -> UnifiConfig
fn clone(&self) -> UnifiConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more