pub enum ResultCode {
Show 63 variants Ok, ServerError, KeyNotFoundError, GenerationError, ParameterError, KeyExistsError, BinExistsError, ClusterKeyMismatch, ServerMemError, Timeout, NoXds, ServerNotAvailable, BinTypeError, RecordTooBig, KeyBusy, ScanAbort, UnsupportedFeature, BinNotFound, DeviceOverload, KeyMismatch, InvalidNamespace, BinNameTooLong, FailForbidden, ElementNotFound, ElementExists, EnterpriseOnly, QueryEnd, SecurityNotSupported, SecurityNotEnabled, SecuritySchemeNotSupported, InvalidCommand, InvalidField, IllegalState, InvalidUser, UserAlreadyExists, InvalidPassword, ExpiredPassword, ForbiddenPassword, InvalidCredential, InvalidRole, RoleAlreadyExists, InvalidPrivilege, NotAuthenticated, RoleViolation, UdfBadResponse, LargeItemNotFound, BatchDisabled, BatchMaxRequestsExceeded, BatchQueuesFull, IndexFound, IndexNotFound, IndexOom, IndexNotReadable, IndexGeneric, IndexNameMaxLen, IndexMaxCount, QueryAborted, QueryQueueFull, QueryTimeout, QueryGeneric, QueryNetioErr, QueryDuplicate, Unknown(u8),
}
Expand description

Database operation error codes. The error codes are defined in the server-side file proto.h.

Variants§

§

Ok

OperationType was successful.

§

ServerError

Unknown server failure.

§

KeyNotFoundError

On retrieving, touching or replacing a record that doesn’t exist.

§

GenerationError

On modifying a record with unexpected generation.

§

ParameterError

Bad parameter(s) were passed in database operation call.

§

KeyExistsError

On create-only (write unique) operations on a record that already exists.

§

BinExistsError

On create-only (write unique) operations on a bin that already exists.

§

ClusterKeyMismatch

Expected cluster Id was not received.

§

ServerMemError

Server has run out of memory.

§

Timeout

Client or server has timed out.

§

NoXds

Xds product is not available.

§

ServerNotAvailable

Server is not accepting requests.

§

BinTypeError

OperationType is not supported with configured bin type (single-bin or multi-bin).

§

RecordTooBig

Record size exceeds limit.

§

KeyBusy

Too many concurrent operations on the same record.

§

ScanAbort

Scan aborted by server.

§

UnsupportedFeature

Unsupported Server Feature (e.g. Scan + Udf)

§

BinNotFound

Specified bin name does not exist in record.

§

DeviceOverload

Specified bin name does not exist in record.

§

KeyMismatch

Key type mismatch.

§

InvalidNamespace

Invalid namespace.

§

BinNameTooLong

Bin name length greater than 14 characters.

§

FailForbidden

OperationType not allowed at this time.

§

ElementNotFound

Returned by Map put and put_items operations when policy is REPLACE but key was not found.

§

ElementExists

Returned by Map put and put_items operations when policy is CREATE_ONLY but key already exists.

§

EnterpriseOnly

Enterprise-only feature not supported by the community edition

§

QueryEnd

There are no more records left for query.

§

SecurityNotSupported

Security type not supported by connected server.

§

SecurityNotEnabled

Administration command is invalid.

§

SecuritySchemeNotSupported

Administration field is invalid.

§

InvalidCommand

Administration command is invalid.

§

InvalidField

Administration field is invalid.

§

IllegalState

Security protocol not followed.

§

InvalidUser

User name is invalid.

§

UserAlreadyExists

User was previously created.

§

InvalidPassword

Password is invalid.

§

ExpiredPassword

Security credential is invalid.

§

ForbiddenPassword

Forbidden password (e.g. recently used)

§

InvalidCredential

Security credential is invalid.

§

InvalidRole

Role name is invalid.

§

RoleAlreadyExists

Role already exists.

§

InvalidPrivilege

Privilege is invalid.

§

NotAuthenticated

User must be authentication before performing database operations.

§

RoleViolation

User does not posses the required role to perform the database operation.

§

UdfBadResponse

A user defined function returned an error code.

§

LargeItemNotFound

The requested item in a large collection was not found.

§

BatchDisabled

Batch functionality has been disabled.

§

BatchMaxRequestsExceeded

Batch max requests have been exceeded.

§

BatchQueuesFull

All batch queues are full.

§

IndexFound

Secondary index already exists.

§

IndexNotFound

Requested secondary index does not exist.

§

IndexOom

Secondary index memory space exceeded.

§

IndexNotReadable

Secondary index not available.

§

IndexGeneric

Generic secondary index error.

§

IndexNameMaxLen

Index name maximum length exceeded.

§

IndexMaxCount

Maximum number of indicies exceeded.

§

QueryAborted

Secondary index query aborted.

§

QueryQueueFull

Secondary index queue full.

§

QueryTimeout

Secondary index query timed out on server.

§

QueryGeneric

Generic query error.

§

QueryNetioErr

Query NetIo error on server

§

QueryDuplicate

Duplicate TaskId sent for the statement

§

Unknown(u8)

Unknown server result code

Implementations§

source§

impl ResultCode

source

pub fn into_string(self) -> String

Convert a result code into an string.

Trait Implementations§

source§

impl Clone for ResultCode

source§

fn clone(&self) -> ResultCode

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 ResultCode

source§

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

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

impl Display for ResultCode

source§

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

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

impl From<ResultCode> for String

source§

fn from(code: ResultCode) -> String

Converts to this type from the input type.
source§

impl From<u8> for ResultCode

source§

fn from(val: u8) -> ResultCode

Converts to this type from the input type.
source§

impl PartialEq<ResultCode> for ResultCode

source§

fn eq(&self, other: &ResultCode) -> 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 ResultCode

source§

impl StructuralPartialEq for ResultCode

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> Same<T> for T

§

type Output = T

Should always be Self
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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V