liboxia 0.0.1

Liboxia is a Rust library designed for both native Rust applications and for integration with other languages via its C Foreign Function Interface (FFI). It serves as a client SDK for Oxia, a distributed key-value store, enabling robust, asynchronous data operations.
Documentation
use thiserror::Error;

#[derive(Error, Debug, Clone)]
pub enum OxiaError {
    #[error("unexpected transport error: {0}")]
    Transport(String),

    #[error("unexpected grpc status: {0}")]
    GrpcStatus(#[from] tonic::Status),

    #[error("unexpected status: {0}")]
    UnexpectedStatus(String),

    #[error("shard leader not found.  shard={0}")]
    ShardLeaderNotFound(i64),

    #[error("key leader not found.  key={0}")]
    KeyLeaderNotFound(String),

    #[error("key not found")]
    KeyNotFound(),

    #[error("unexpected version id")]
    UnexpectedVersionId(),

    #[error("session does not exist")]
    SessionDoesNotExist(),

    #[error("retryable")]
    InternalRetryable(),

    #[error("the operation has been cancelled")]
    Cancelled(),

    #[error("illegal argument: {0}")]
    IllegalArgument(String),
}