pub struct Config {
pub base_url: Url,
pub wire_version: WireVersion,
pub timeout: Duration,
pub retry: RetryPolicy,
pub credentials: Option<Credentials>,
}Expand description
Everything one Client needs about one
terminology server.
base_url is the FHIR service base URL, the path CodeSystem,
ConceptMap and ValueSet live under
(https://hl7.org/fhir/R4/http.html#root). A server that serves several
releases side by side puts the release in that path, so the base URL and
wire_version are set together and must agree.
Fields§
§base_url: UrlThe FHIR service base URL.
wire_version: WireVersionThe release the server answers in.
timeout: DurationHow long one request may take, connection included.
retry: RetryPolicyThe retry budget.
credentials: Option<Credentials>The credentials, when the deployment needs them.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(base_url: Url, wire_version: WireVersion) -> Self
pub fn new(base_url: Url, wire_version: WireVersion) -> Self
Returns a configuration for the server whose base URL is base_url.
The timeout and the retry budget take their defaults, and no credentials are set.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Returns this configuration with timeout as its per-request budget.
Sourcepub fn with_retry(self, retry: RetryPolicy) -> Self
pub fn with_retry(self, retry: RetryPolicy) -> Self
Returns this configuration with retry as its retry budget.
Sourcepub fn with_credentials(self, credentials: Credentials) -> Self
pub fn with_credentials(self, credentials: Credentials) -> Self
Returns this configuration with credentials presented on every call.