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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//! # TurboVault Core
//!
//! Core data models, error types, and configuration for the Obsidian vault management system.
//! This crate defines the canonical types that all other crates depend on.
//!
//! ## Architecture Principles
//!
//! - **No External Crate Dependencies Beyond Serialization**: Only serde + basic Rust stdlib
//! - **Type-Driven Design**: Strong types replace string-based APIs
//! - **Zero Panic in Libraries**: All errors are Result<T, ObsidianError>
//! - **Builder Pattern for Complex Types**: Configuration structs use builders
//! - **Immutable by Default**: Mutation through explicit methods only
//!
//! ## Core Modules
//!
//! - [`models`] - Core vault data types (VaultFile, Link, Frontmatter, etc.)
//! - [`error`] - Comprehensive error types and Result aliases
//! - [`config`] - Server and vault configuration structures
//! - [`validation`] - Content validation framework
//! - [`metrics`] - Performance monitoring and statistics
//! - [`multi_vault`] - Multi-vault management support
//! - [`profiles`] - Configuration profiles for different environments
//! - [`utils`] - Utility functions and builders
//!
//! ## Usage Examples
//!
//! ### Working with Vault Files
//!
//! ```
//! use turbovault_core::prelude::*;
//! use std::path::PathBuf;
//!
//! // Create a vault file metadata
//! let metadata = FileMetadata {
//! path: PathBuf::from("my-note.md"),
//! size: 1024,
//! created_at: 0.0,
//! modified_at: 1234567890.0,
//! checksum: "abc123".to_string(),
//! is_attachment: false,
//! };
//! ```
//!
//! ### Error Handling
//!
//! ```
//! use turbovault_core::prelude::*;
//! use std::path::PathBuf;
//!
//! fn process_vault() -> Result<()> {
//! // All operations return Result<T>
//! let _path = PathBuf::from("vault.md");
//! // Error handling with type-safe error variants
//! let _err = Error::parse_error("Invalid markdown content");
//! Ok(())
//! }
//! ```
//!
//! ### Configuration
//!
//! ```
//! use turbovault_core::prelude::*;
//!
//! let config = ServerConfig::default();
//! // Access configuration properties safely
//! let _config_has_vaults = !config.vaults.is_empty();
//! ```
//!
//! ## Type Safety
//!
//! The core types use enums and strong types instead of strings:
//!
//! - [`LinkType`] - Distinguishes wikilinks, embeds, markdown links, etc.
//! - [`Severity`] - Validation issue severity levels
//! - [`models`] - Rich data models with position tracking
pub use *;
pub use ;
pub use ;
pub use *;
pub use ;
pub use ConfigProfile;
pub use ;
pub use ;
/// Re-export commonly used types