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
//! # Tnuctipun
//!
//! <img src="https://repository-images.githubusercontent.com/1030517113/b428d5ff-e9b3-4ae4-a3e7-77979debc7b0" alt="Tnuctipun Logo" width="600" style="border: 1px solid #ddd; border-radius: 8px;" />
//!
//! **Type-safe MongoDB query and update builder for Rust**
//!
//! The Tnuctipun of Ringworld — ancient, subversive, ingenious — or a type-safe MongoDB builder library.
//!
//! ## Overview
//!
//! Tnuctipun provides compile-time type safety for MongoDB operations by generating field witnesses
//! and enabling type-checked query, projection, and update building.
//!
//! ## Features
//!
//! - **Type-safe field access**: Use compile-time validated field names
//! - **MongoDB query building**: Build complex queries with type safety
//! - **MongoDB projection building**: Create projections with fluent method chaining
//! - **MongoDB update building**: Create update documents with type-safe field operations
//! - **Derive macros**: Automatically generate field witnesses and comparable traits
//! - **Compile-time validation**: Catch field name typos and type mismatches at compile time
//!
//! ## Quick Start
//!
//! ```rust
//! use tnuctipun::{FieldWitnesses, MongoComparable, filters::empty, projection, updates};
//! use serde::{Deserialize, Serialize};
//!
//! #[derive(Debug, Serialize, Deserialize, FieldWitnesses, MongoComparable)]
//! struct User {
//! pub name: String,
//! pub age: i32,
//! pub email: String,
//! }
//!
//! // Type-safe filter building with compile-time field validation
//! let filter_doc = empty::<User>()
//! .eq::<user_fields::Name, _>("John".to_string())
//! .gt::<user_fields::Age, _>(18)
//! .and(); // Convert to MongoDB document
//! ```
//!
//! For comprehensive documentation, see the [User Guide](https://cchantep.github.io/tnuctipun/).
//!
//! ## Builder modules
//!
//! - [`filters`] - Query filter building
//! - [`projection`] - Field projection building
//! - [`updates`] - Update document building
// Modules
// Re-export the procedural macros
pub use FieldWitnesses;
pub use MongoComparable;
// Export the traits
pub use crate;
pub use crateFieldFilterBuilder;
pub use crate;
pub use crate;
pub use cratePath;