Enum zookeeper_async::CreateMode
source · pub enum CreateMode {
Persistent,
Ephemeral,
PersistentSequential,
EphemeralSequential,
Container,
}
Expand description
CreateMode value determines how the znode is created on ZooKeeper.
Variants§
Persistent
The znode will not be automatically deleted upon client’s disconnect.
Ephemeral
The znode will be deleted upon the client’s disconnect.
PersistentSequential
The name of the znode will be appended with a monotonically increasing number. The actual
path name of a sequential node will be the given path plus a suffix "i"
where i is the
current sequential number of the node. The sequence number is always fixed length of 10
digits, 0 padded. Once such a node is created, the sequential number will be incremented by
one.
EphemeralSequential
The znode will be deleted upon the client’s disconnect, and its name will be appended with a monotonically increasing number.
Container
Container nodes are special purpose nodes useful for recipes such as leader, lock, etc. When
the last child of a container is deleted, the container becomes a candidate to be deleted by
the server at some point in the future. Given this property, you should be prepared to get
ZkError::NoNode
when creating children inside of this container node.
Trait Implementations§
source§impl Clone for CreateMode
impl Clone for CreateMode
source§fn clone(&self) -> CreateMode
fn clone(&self) -> CreateMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateMode
impl Debug for CreateMode
source§impl Display for CreateMode
impl Display for CreateMode
source§impl From<CreateMode> for String
impl From<CreateMode> for String
source§fn from(value: CreateMode) -> Self
fn from(value: CreateMode) -> Self
source§impl Hash for CreateMode
impl Hash for CreateMode
source§impl Ord for CreateMode
impl Ord for CreateMode
source§fn cmp(&self, other: &CreateMode) -> Ordering
fn cmp(&self, other: &CreateMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<CreateMode> for CreateMode
impl PartialEq<CreateMode> for CreateMode
source§fn eq(&self, other: &CreateMode) -> bool
fn eq(&self, other: &CreateMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<CreateMode> for CreateMode
impl PartialOrd<CreateMode> for CreateMode
source§fn partial_cmp(&self, other: &CreateMode) -> Option<Ordering>
fn partial_cmp(&self, other: &CreateMode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more