#[non_exhaustive]pub struct ClientConfig {
pub peers: BTreeMap<String, String>,
pub allowed: Option<Vec<String>>,
pub timeout: Duration,
pub key_ttl: Duration,
pub key_refetch: Duration,
pub mesh_ttl: Duration,
}Expand description
The client’s configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.peers: BTreeMap<String, String>Origins to use instead of https://<host> for some hosts (tests, private networks).
allowed: Option<Vec<String>>When set, the only hosts fetched from.
timeout: DurationThe time limit of one request (default 10 s).
key_ttl: DurationKey documents’ lifetime in the cache (default 300 s).
key_refetch: DurationThe shortest interval between two fetches of one host’s key document (default 10 s).
mesh_ttl: DurationMesh documents’ lifetime in the cache (default 300 s).
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§impl Debug for ClientConfig
impl Debug for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more