pub struct ClientOpts {
pub client_version_major: u64,
pub client_version_minor: u64,
pub client_version_patch: u64,
pub compression: Compression,
pub read_buffer_bytes: usize,
/* private fields */
}Expand description
Client settings sent during Hello handshake.
String values are copied and null-terminated during connection. Interior
null bytes return ErrorKind::Usage.
Fields§
§client_version_major: u64Client version reported in system.query_log. Default is 0.0.0.
client_version_minor: u64§client_version_patch: u64§compression: Compression§read_buffer_bytes: usizeRead buffer size in bytes. Zero selects clickhouse-c 8 KiB default.
Implementations§
Source§impl ClientOpts
impl ClientOpts
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates settings for default user and database, empty password, and
no compression.
Sourcepub fn client_name(self, s: &str) -> Self
pub fn client_name(self, s: &str) -> Self
Sets client name. Default is "clickhouse-c".
Sourcepub fn password(self, s: &str) -> Self
pub fn password(self, s: &str) -> Self
Sets authentication password.
Native protocol sends password as clear text inside Hello message. Use TLS when transport is not trusted.
Sourcepub fn client_version(self, major: u64, minor: u64, patch: u64) -> Self
pub fn client_version(self, major: u64, minor: u64, patch: u64) -> Self
Sets reported client version.
Sourcepub fn compression(self, compression: Compression) -> Self
pub fn compression(self, compression: Compression) -> Self
Sets compression algorithm.
Compressed connections require a matching Codec in Client::init.
Trait Implementations§
Source§impl Clone for ClientOpts
impl Clone for ClientOpts
Source§impl Debug for ClientOpts
impl Debug for ClientOpts
Auto Trait Implementations§
impl Freeze for ClientOpts
impl RefUnwindSafe for ClientOpts
impl Send for ClientOpts
impl Sync for ClientOpts
impl Unpin for ClientOpts
impl UnsafeUnpin for ClientOpts
impl UnwindSafe for ClientOpts
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