solidb_client/lib.rs
1//! SoliDB Rust Client
2//!
3//! High-performance native driver client for SoliDB with HTTP and TCP transport support.
4//!
5//! # HTTP Example (Default)
6//!
7//! ```rust
8//! use solidb_client::{SoliDBClientBuilder, HttpClient};
9//!
10//! #[tokio::main]
11//! async fn main() -> Result<(), solidb_client::DriverError> {
12//! let client = SoliDBClientBuilder::new("http://localhost:6745")
13//! .auth("mydb", "admin", "password")
14//! .build_http()
15//! .await?;
16//!
17//! let databases = client.list_databases().await?;
18//! println!("Databases: {:?}", databases);
19//! Ok(())
20//! }
21//! ```
22//!
23//! # TCP Example
24//!
25//! ```rust
26//! use solidb_client::SoliDBClient;
27//!
28//! #[tokio::main]
29//! async fn main() -> Result<(), solidb_client::DriverError> {
30//! let mut client = SoliDBClientBuilder::new("localhost:6745")
31//! .use_tcp()
32//! .auth("mydb", "admin", "password")
33//! .build()
34//! .await?;
35//!
36//! let version = client.ping().await?;
37//! println!("Server version: {}", version);
38//! Ok(())
39//! }
40//! ```
41
42pub mod client;
43pub mod protocol;
44
45pub use client::{SoliDBClient, SoliDBClientBuilder, HttpClient, Transport};
46pub use protocol::{Command, DriverError, Response};