Expand description
§VedDB Client
Official Rust client for VedDB - High-performance shared memory KV store with Pub/Sub capabilities.
§Features
- Synchronous and Asynchronous APIs - Choose between blocking and non-blocking operations
- Connection Pooling - Efficiently manage multiple connections to VedDB servers
- Automatic Reconnection - Handle network issues gracefully
- Pipelining - Send multiple commands without waiting for responses
- Pub/Sub Support - Subscribe to channels and patterns
§Example
use veddb_client::{Client, Result};
#[tokio::main]
async fn main() -> Result<()> {
// Connect to a VedDB server
let client = Client::connect("127.0.0.1:50051".parse()?).await?;
// Set a value
client.set("my_key", "my_value").await?;
// Get a value
let value: Vec<u8> = client.get("my_key").await?;
println!("Got value: {:?}", value);
Ok(())
}
Re-exports§
pub use bytes;
Structs§
- Client
- A client for interacting with a VedDB server
- Client
Builder - A builder for configuring and creating a client
- Command
- Command structure
- Connection
- A connection to a VedDB server
- Connection
Pool - A connection pool for managing multiple connections to a VedDB server
- Response
- Response structure
Enums§
- Error
- Error type for VedDB client operations
- Status
Code - Response status codes
Type Aliases§
- Result
- Custom result type for VedDB operations