1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! BoltR: A pure-Rust Bolt v5.x wire protocol library.
//!
//! This crate implements the Bolt binary protocol used by Neo4j and compatible
//! graph databases. It provides both server and client components for building
//! Bolt-compatible applications.
//!
//! # Quick start (server)
//!
//! ```rust,no_run
//! use std::net::SocketAddr;
//! use boltr::server::{BoltServer, BoltBackend};
//!
//! # async fn example(backend: impl BoltBackend) -> Result<(), boltr::error::BoltError> {
//! let addr: SocketAddr = "127.0.0.1:7687".parse().unwrap();
//! BoltServer::builder(backend)
//! .max_sessions(100)
//! .serve(addr)
//! .await?;
//! # Ok(())
//! # }
//! ```
//!
//! # Quick start (client)
//!
//! ```rust,no_run
//! # #[cfg(feature = "client")]
//! # async fn example() -> Result<(), boltr::error::BoltError> {
//! use boltr::client::BoltSession;
//!
//! let addr = "127.0.0.1:7687".parse().unwrap();
//! let mut session = BoltSession::connect(addr).await?;
//! let result = session.run("RETURN 1 AS n").await?;
//!
//! for record in &result.records {
//! println!("{:?}", record);
//! }
//!
//! session.close().await?;
//! # Ok(())
//! # }
//! ```
//!
//! # Architecture
//!
//! - **`packstream`**, binary encoding/decoding (PackStream format)
//! - **`chunk`**, message framing (2-byte length-prefixed chunks)
//! - **`message`**, protocol message types and serialization
//! - **`types`**, Bolt value types (scalars, graph structures, temporal, spatial)
//! - **`server`**, server framework with `BoltBackend` trait
//! - **`client`**, client for connecting to Bolt servers (feature-gated)
// Crate root re-exports for convenience.
pub use BoltError;
pub use TlsConfig;
pub use ;
pub use BoltValue;
pub use ;
pub use WsStream;