[][src]Enum custom_codes::DbOps

pub enum DbOps {
    RepoCreated,
    RepoAlreadyExists,
    RepoEmpty,
    RepoNotFound,
    RepoDropped,
    DbIntegrityConsistent,
    DbIntegrityCorrupted,
    DocumentIntegrityConsistent,
    DocumentIntegrityCorrupted,
    DbCreated,
    DbFound,
    DbAlreadyExists,
    DbNotFound,
    DbEmpty,
    DbList(Vec<String>),
    DbModified,
    DbDropped,
    DocumentCreated,
    DocumentInserted,
    DocumentFound,
    DocumentEmpty,
    DocumentList(Vec<String>),
    DocumentAlreadyExists,
    DocumentNotFound,
    DocumentModified,
    DocumentDropped,
    FieldCreated,
    FieldInserted,
    FieldFound,
    FieldAlreadyExists,
    FieldNotFound,
    FieldContents(Vec<u8>),
    FieldList(Vec<String>),
    FieldModified,
    FieldDropped,
    Created,
    Commited,
    UnCommited,
    Inserted,
    Changed,
    Unchanged,
    Skipped,
    AlreadyExists,
    Modified,
    Swapped,
    Deleted,
    KeyFound,
    KeyNotFound,
    NotExecuted,
    QueryConflictError,
    Empty,
    Queued,
    DeQueued,
    CompactionTrue,
    CompactionFalse,
    ConnRefused,
    PortAddrInUse,
    DriverError,
    RuntimeError,
    EncounteredErrors(String),
    PermissionDenied,
    ClusterOnline,
    ClusterOffline,
    ClusterSynced,
    ClusterNodeAdded,
    ConfigUpdated,
    ClusterNodeDropped,
    Logged,
    NotLogged,
    Interrupted,
    Unspecified,
}

Custom Response Codes Using Enums For Efficient Comparison

Examples

let foo = DbOps::Inserted;
assert_eq!(foo, DbOps::Inserted);

Variants

RepoCreated

A Repository has been created

RepoAlreadyExists

The repository trying to be created already exists

RepoEmpty

An empty Repository with no databases

RepoNotFound

An repository is not available on disk

RepoDropped

A Repository has been deleted

DbIntegrityConsistent

A checksum of the database shows a database is consistent

DbIntegrityCorrupted

A checksum fo the database shows the database is not consistent

DocumentIntegrityConsistent

A checksum of the document is consistent

DocumentIntegrityCorrupted

A checksum fo the document is not consistent

DbCreated

Database has been created

DbFound

Database has been Found after a search

DbAlreadyExists

Database being inserted already exists in the repo

DbNotFound

Database does not exist

DbEmpty

Database is empty

DbList(Vec<String>)

A list containing Databases

DbModified

A Database has neen modified

DbDropped

A database has been removed

DocumentCreated

Document has been created

DocumentInserted

Document has been inserted

DocumentFound

Document has been Found after a search

DocumentEmpty

Document is empty

DocumentList(Vec<String>)

List of Documents

DocumentAlreadyExists

Document being inserted already exists in the DB

DocumentNotFound

Document does not exist

DocumentModified

A Document has neen modified

DocumentDropped

Document has been removed

FieldCreated

Field has been created

FieldInserted

Field has been inserted

FieldFound

Field has been Found after a search

FieldAlreadyExists

Field being inserted already exists in the DB

FieldNotFound

Field does not exist

FieldContents(Vec<u8>)

Contents of a field in heap allocated bytes

FieldList(Vec<String>)

List of fields in a document

FieldModified

A Field has neen modified

FieldDropped

Field has been removed

Created

A Write to create a database is successfull

Commited

A Write to a commit log was successful

UnCommited

A Write to a commit log was unsuccessful

Inserted

A Write is successful

Changed

A Change is successful

Unchanged

A Change is unsuccessful

Skipped

A Command is skipped since the document does not exist

AlreadyExists

Document already exists

Modified

Document has been updated

Swapped

A document value has been Swapped replacing it with the new value provided Especially useful for Key/Value stores

Deleted

An Document has been deleted

KeyFound

Key Found in KV Store/Database, Field or Document depending on query

KeyNotFound

Key Not Found in Database, Field or Document depending on query

NotExecuted

A Command or Query Has Not Been Executed

QueryConflictError

Two or more queries are not supposed to be used command eg. using get and list together

Empty

Database is empty

Queued

The command has been added to a queue

DeQueued

Command has been removed from queue

CompactionTrue

Log compaction successful

CompactionFalse

Log compaction unsuccessful

ConnRefused

Connection to a database is not available

PortAddrInUse

Port is in use

DriverError

Driver to the database has an error

RuntimeError

An error occured when trying to execute a command at database level

EncounteredErrors(String)

Encountered Errors When Trying to connect to a database

PermissionDenied

No permissions to complete the I/O operation

ClusterOnline

A cluster in online and ready to receive commands

ClusterOffline

A cluster is offline

ClusterSynced

Cluster details synced across all nodes

ClusterNodeAdded

Added a node to the cluster

ConfigUpdated

Updated configuration to the cluster

ClusterNodeDropped

A node has been permanently removed

Logged

The details have been inserted to the specified logs

NotLogged

The details have not been logged

Interrupted

The Operation was interrupted and can be resumed

Unspecified

Status of an operation is not initialized

Trait Implementations

impl Clone for DbOps[src]

impl Debug for DbOps[src]

impl<'de> Deserialize<'de> for DbOps[src]

impl Eq for DbOps[src]

impl PartialEq<DbOps> for DbOps[src]

impl Serialize for DbOps[src]

impl StructuralEq for DbOps[src]

impl StructuralPartialEq for DbOps[src]

Auto Trait Implementations

impl RefUnwindSafe for DbOps

impl Send for DbOps

impl Sync for DbOps

impl Unpin for DbOps

impl UnwindSafe for DbOps

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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