Trusted
The policy for a known upstream: it checks the scheme, optionally pins the host, and applies the downgrade rule. It does no address filtering, has no name rule and no port rule, so a private address is fetchable.
Stable Core. Equality is on every property. toString() prints the number of pinned hosts, never a host.
Types
Collects the properties of a Trusted. Not thread-safe; use it only inside the factory's lambda. A property holds the caller's reference until the policy is built, which copies it.
Properties
Whether http is allowed; false means https only.
The hosts a hop may reach, canonical (lower-case; IPv6 without brackets); empty means any host. Exact match with Url.host.
The caps, timeouts and concurrency limits that go with this policy.
Functions
Two Trusted policies are equal when their pinnedHosts, allowCleartext and settings are equal.
A diagnostic string for logs: the number of pinnedHosts, never a host, allowCleartext and settings. Its format is not part of the API and may change.