Struct zookeeper_client::ClientBuilder
source · pub struct ClientBuilder { /* private fields */ }
Expand description
Builder for Client with more options than Client::connect.
Implementations§
source§impl ClientBuilder
impl ClientBuilder
sourcepub fn with_session_timeout(&mut self, timeout: Duration) -> &mut Self
pub fn with_session_timeout(&mut self, timeout: Duration) -> &mut Self
Specifies target session timeout to negotiate with ZooKeeper server.
Defaults to 6s.
sourcepub fn with_connection_timeout(&mut self, timeout: Duration) -> &mut Self
pub fn with_connection_timeout(&mut self, timeout: Duration) -> &mut Self
Specifies idle timeout to conclude a connection as loss.
Defaults to 2/5
of session timeout.
sourcepub fn with_readonly(&mut self, readonly: bool) -> &mut ClientBuilder
pub fn with_readonly(&mut self, readonly: bool) -> &mut ClientBuilder
Specifies whether readonly server is allowed.
sourcepub fn with_auth(&mut self, scheme: String, auth: Vec<u8>) -> &mut ClientBuilder
pub fn with_auth(&mut self, scheme: String, auth: Vec<u8>) -> &mut ClientBuilder
Specifies auth info for given authentication scheme.
sourcepub fn with_session(&mut self, id: SessionId, password: Vec<u8>) -> &mut Self
pub fn with_session(&mut self, id: SessionId, password: Vec<u8>) -> &mut Self
Specifies session to reestablish.
sourcepub fn assume_server_version(
&mut self,
major: u32,
minor: u32,
patch: u32
) -> &mut Self
pub fn assume_server_version( &mut self, major: u32, minor: u32, patch: u32 ) -> &mut Self
Specifies client assumed server version of ZooKeeper cluster.
Client will issue server compatible protocol to avoid Error::Unimplemented for some operations. See Client::create for an example.
See ZOOKEEPER-1381 and ZOOKEEPER-3762 for references.
Trait Implementations§
source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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