redis_oxide/lib.rs
1//! High-performance async Redis client for Rust
2//!
3//! `redis-oxide` is a Redis client library similar to StackExchange.Redis for .NET.
4//! It automatically detects whether you're connecting to a standalone Redis server
5//! or a Redis Cluster, and handles MOVED/ASK redirects transparently.
6//!
7//! # Features
8//!
9//! - Automatic topology detection (Standalone vs Cluster)
10//! - Transparent handling of MOVED and ASK redirects
11//! - Multiple connection strategies (multiplexed, pooled)
12//! - Type-safe command builders
13//! - Async/await support with Tokio
14//! - Comprehensive error handling
15//!
16//! # Quick Start
17//!
18//! ```no_run
19//! use redis_oxide::{Client, ConnectionConfig};
20//!
21//! #[tokio::main]
22//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
23//!     let config = ConnectionConfig::new("redis://localhost:6379");
24//!     let client = Client::connect(config).await?;
25//!     
26//!     client.set("mykey", "myvalue").await?;
27//!     let value: Option<String> = client.get("mykey").await?;
28//!     println!("Value: {:?}", value);
29//!     
30//!     Ok(())
31//! }
32//! ```
33
34#![deny(warnings)]
35#![warn(missing_docs)]
36#![allow(clippy::missing_errors_doc)]
37#![allow(clippy::must_use_candidate)]
38#![allow(clippy::missing_const_for_fn)]
39#![allow(clippy::uninlined_format_args)]
40#![allow(clippy::future_not_send)]
41#![allow(clippy::significant_drop_tightening)]
42#![allow(clippy::doc_markdown)]
43#![allow(clippy::cast_possible_truncation)]
44#![allow(clippy::cast_sign_loss)]
45#![allow(clippy::cast_lossless)]
46#![allow(clippy::return_self_not_must_use)]
47#![allow(clippy::unnecessary_literal_bound)]
48#![allow(clippy::large_enum_variant)]
49#![allow(clippy::implicit_clone)]
50#![allow(clippy::manual_let_else)]
51#![allow(clippy::unnecessary_wraps)]
52#![allow(clippy::unused_async)]
53
54pub mod client;
55pub mod cluster;
56pub mod commands;
57pub mod connection;
58pub mod pool;
59pub mod protocol;
60
61pub use client::Client;
62pub mod core;
63
64pub use crate::core::{
65    config::{ConnectionConfig, PoolConfig, PoolStrategy, TopologyMode},
66    error::{RedisError, RedisResult},
67    types::{NodeInfo, RedisValue, SlotRange},
68    value::RespValue,
69};