Make ClientTimeoutConfig members crate-private.

We shouldn't have pub members in these config objects.
This commit is contained in:
Nick Mathewson 2021-12-07 14:05:41 -05:00
parent 46c917d127
commit 2337d14ecf
1 changed files with 3 additions and 3 deletions

View File

@ -59,18 +59,18 @@ pub struct ClientTimeoutConfig {
/// to a host? /// to a host?
#[builder(default = "default_connect_timeout()")] #[builder(default = "default_connect_timeout()")]
#[serde(with = "humantime_serde", default = "default_connect_timeout")] #[serde(with = "humantime_serde", default = "default_connect_timeout")]
pub connect_timeout: Duration, pub(crate) connect_timeout: Duration,
/// How long should we wait before timing out when resolving a DNS record? /// How long should we wait before timing out when resolving a DNS record?
#[builder(default = "default_dns_resolve_timeout()")] #[builder(default = "default_dns_resolve_timeout()")]
#[serde(with = "humantime_serde", default = "default_dns_resolve_timeout")] #[serde(with = "humantime_serde", default = "default_dns_resolve_timeout")]
pub resolve_timeout: Duration, pub(crate) resolve_timeout: Duration,
/// How long should we wait before timing out when resolving a DNS /// How long should we wait before timing out when resolving a DNS
/// PTR record? /// PTR record?
#[builder(default = "default_dns_resolve_ptr_timeout()")] #[builder(default = "default_dns_resolve_ptr_timeout()")]
#[serde(with = "humantime_serde", default = "default_dns_resolve_ptr_timeout")] #[serde(with = "humantime_serde", default = "default_dns_resolve_ptr_timeout")]
pub resolve_ptr_timeout: Duration, pub(crate) resolve_ptr_timeout: Duration,
} }
// NOTE: it seems that `unwrap` may be safe because of builder defaults // NOTE: it seems that `unwrap` may be safe because of builder defaults