pub enum KeeperState {
    Disconnected,
    SyncConnected,
    AuthFailed,
    ConnectedReadOnly,
    SaslAuthenticated,
    Expired,
}
Expand description

Enumeration of states the client may be at a Watcher Event. It represents the state of the server at the time the event was generated.

Variants§

§

Disconnected

The client is in the disconnected state - it is not connected to any server in the ensemble.

§

SyncConnected

The client is in the connected state - it is connected to a server in the ensemble (one of the servers specified in the host connection parameter during ZooKeeper client creation).

§

AuthFailed

Authentication has failed – connection requires a new ZooKeeper instance.

§

ConnectedReadOnly

The client is connected to a read-only server, that is the server which is not currently connected to the majority. The only operations allowed after receiving this state is read operations. This state is generated for read-only clients only since read/write clients aren’t allowed to connect to read-only servers.

§

SaslAuthenticated

Used to notify clients that they are SASL-authenticated, so that they can perform ZooKeeper actions with their SASL-authorized permissions.

§

Expired

The serving cluster has expired this session. The ZooKeeper client connection (the session) is no longer valid. You must create a new client connection (instantiate a new ZooKeeper instance) if you with to access the ensemble.

Trait Implementations§

source§

impl Clone for KeeperState

source§

fn clone(&self) -> KeeperState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for KeeperState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<i32> for KeeperState

source§

fn from(val: i32) -> KeeperState

Converts to this type from the input type.
source§

impl PartialEq<KeeperState> for KeeperState

source§

fn eq(&self, other: &KeeperState) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for KeeperState

source§

impl StructuralPartialEq for KeeperState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.