pub struct ClientConfig {
pub client_id: String,
pub supported_versions: Vec<u8>,
pub capabilities: HelloCapabilities,
pub auth: Auth,
pub connect_timeout: Option<Duration>,
pub request_timeout: Option<Duration>,
}Expand description
Connection configuration. Build one with ClientConfig::new, which takes
the mandatory credential and fills the rest with sensible defaults (wire
version 1, streaming advertised). There is no Default: a connection with
no credential cannot exist.
Fields§
§client_id: StringFree-form client identifier sent in HELLO.
supported_versions: Vec<u8>Wire versions the client supports, in preference order. u8 on the
wire.
capabilities: HelloCapabilitiesCapabilities advertised in HELLO.
auth: AuthHow to authenticate after WELCOME. Mandatory — the credential is the connection’s identity; the server assigns the space and namespace.
connect_timeout: Option<Duration>Deadline for the TCP connect. None waits indefinitely.
request_timeout: Option<Duration>Per-response read deadline applied after connecting.
Implementations§
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone 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§
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