Enum ZkError

Source
#[repr(i32)]
pub enum ZkError {
Show 23 variants APIError = -100, AuthFailed = -115, BadArguments = -8, BadVersion = -103, ConnectionLoss = -4, DataInconsistency = -3, EphemeralOnLocalSession = -120, InvalidACL = -114, InvalidCallback = -113, MarshallingError = -5, NoAuth = -102, NoChildrenForEphemerals = -108, NodeExists = -110, NoNode = -101, NotEmpty = -111, NotReadOnly = -119, NoWatcher = -121, OperationTimeout = -7, RuntimeInconsistency = -2, SessionExpired = -112, SessionMoved = -118, SystemError = -1, Unimplemented = -6,
}
Expand description

Basic type for errors returned from the server.

Variants§

§

APIError = -100

This code is never returned from the server. It should not be used other than to indicate a range. Specifically error codes greater than this value are API errors (while values less than this indicate a system error).

§

AuthFailed = -115

Client authentication failed.

§

BadArguments = -8

Invalid arguments.

§

BadVersion = -103

Version conflict in set operation. In case of reconfiguration: reconfig requested from config version X but last seen config has a different version Y.

§

ConnectionLoss = -4

Connection to the server has been lost.

§

DataInconsistency = -3

A data inconsistency was found.

§

EphemeralOnLocalSession = -120

Attempt to create ephemeral node on a local session.

§

InvalidACL = -114

Invalid Acl specified.

§

InvalidCallback = -113

Invalid callback specified.

§

MarshallingError = -5

Error while marshalling or unmarshalling data.

§

NoAuth = -102

Not authenticated.

§

NoChildrenForEphemerals = -108

Ephemeral nodes may not have children.

§

NodeExists = -110

Request to create node that already exists.

§

NoNode = -101

Attempted to read a node that does not exist.

§

NotEmpty = -111

The node has children.

§

NotReadOnly = -119

State-changing request is passed to read-only server.

§

NoWatcher = -121

Attempt to remove a non-existing watcher.

§

OperationTimeout = -7

Operation timeout.

§

RuntimeInconsistency = -2

A runtime inconsistency was found.

§

SessionExpired = -112

The session has been expired by the server.

§

SessionMoved = -118

Session moved to another server, so operation is ignored.

§

SystemError = -1

System and server-side errors. This is never thrown by the server, it shouldn’t be used other than to indicate a range. Specifically error codes greater than this value, but lesser than APIError, are system errors.

§

Unimplemented = -6

Operation is unimplemented.

Trait Implementations§

Source§

impl Clone for ZkError

Source§

fn clone(&self) -> ZkError

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 ZkError

Source§

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

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

impl Display for ZkError

Source§

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

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

impl Error for ZkError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ZkError> for String

Source§

fn from(value: ZkError) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for ZkError

Source§

fn from(number: i32) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for ZkError

Source§

type Primitive = i32

Source§

fn from_primitive(number: Self::Primitive) -> Self

Source§

impl Hash for ZkError

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ZkError

Source§

fn cmp(&self, other: &ZkError) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ZkError

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ZkError

Source§

fn partial_cmp(&self, other: &ZkError) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for ZkError

Source§

impl Eq for ZkError

Source§

impl StructuralPartialEq for ZkError

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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 T
where T: Clone,

Source§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more