[][src]Struct joyent_tokio_zookeeper::ZooKeeperBuilder

pub struct ZooKeeperBuilder { /* fields omitted */ }

Builder that allows customizing options for ZooKeeper connections.

Implementations

impl ZooKeeperBuilder[src]

pub fn connect(
    self,
    addr: &SocketAddr
) -> impl Future<Item = (ZooKeeper, impl Stream<Item = WatchedEvent, Error = ()>), Error = Error>
[src]

Connect to a ZooKeeper server instance at the given address.

Session establishment is asynchronous. This constructor will initiate connection to the server and return immediately - potentially (usually) before the session is fully established. When the session is established, a ZooKeeper instance is returned, along with a "watcher" that will provide notifications of any changes in state.

If the connection to the server fails, the client will automatically try to re-connect. Only if re-connection fails is an error returned to the client. Requests that are in-flight during a disconnect may fail and have to be retried.

pub fn set_timeout(&mut self, t: Duration)[src]

Set the ZooKeeper session expiry timeout.

The default timeout is dictated by the server.

pub fn set_logger(&mut self, l: Logger)[src]

Set the logger that should be used internally in the ZooKeeper client.

By default, all logging is disabled. See also the slog documentation.

Trait Implementations

impl Clone for ZooKeeperBuilder[src]

impl Debug for ZooKeeperBuilder[src]

impl Default for ZooKeeperBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.