ryo-symbol 0.1.0

Symbol system for Rust codebase - unique identifiers and file path management
Documentation
#![warn(missing_docs)]
//! # ryo-symbol
//!
//! Symbol system for Rust codebase - unique identifiers and file path management.
//!
//! ## Overview
//!
//! This crate provides:
//! - **SymbolPath**: Rust ecosystem-wide unique symbol identifier (`tokio::sync::Mutex::lock`)
//! - **SymbolId**: High-performance internal ID (SlotMap-based, O(1) operations)
//! - **SymbolRegistry**: Central registry for symbol management
//! - **WorkspaceFilePath**: Self-contained file path with workspace root
//! - **WorkspacePathResolver**: Path normalization and validation
//!
//! ## Design Philosophy
//!
//! - Two-layer architecture: `SymbolPath` (external) ↔ `SymbolId` (internal)
//! - Single source of truth: All symbol operations go through `SymbolRegistry`
//! - Self-contained paths: `WorkspaceFilePath` can resolve to absolute path without external context
//!
//! ## New in this version
//!
//! - **ContentCache**: File freshness tracking (hash/mtime)
//! - **SymbolPath**: Added `from_workspace_file`, `item_in_file`, `nested_in_file` methods
//! - **FilePathResolver**: SymbolPath → WorkspaceFilePath conversion

// === Public API ===
mod content_cache;
mod crate_name;
mod error;
mod file_path;
mod file_resolver;
mod id;
mod kind;
mod metadata;
mod path;
mod registry;
mod resolver;
mod span;
mod symbol_ref;
mod symbol_resolver;
#[cfg(any(test, feature = "test-utils"))]
mod test_harness;
mod use_resolver;
mod var_scope;

// === Re-exports ===
pub use content_cache::{CacheEntry, ContentCache, Freshness};
pub use crate_name::{CrateName, InvalidCrateNameError};
pub use error::{
    InvalidSymbolId, ParseError, RegistrationError, RenameError, ResolutionError, ResolveError,
    UnregisterReexportError,
};
pub use file_path::{write_with_parents, WorkspaceFilePath};
pub use file_resolver::FilePathResolver;
pub use id::SymbolId;
// Re-export uuid for persistent identity
pub use kind::SymbolKind;
#[cfg(any(test, feature = "test-utils"))]
pub use metadata::MockMetadataProvider;
pub use metadata::{
    CargoMetadataProvider, CrateInfo, MetadataError, TargetInfo, TargetKind,
    WorkspaceMetadataProvider,
};
pub use path::{Segment, SymbolPath, SymbolPathBuilder};
pub use registry::{MemoryStats, ReExportInfo, SymbolRegistry};
pub use resolver::{CrateLayout, EntryPoint, WorkspacePathResolver, WorkspaceType};
pub use span::{FileSpan, Visibility};
pub use symbol_ref::SymbolRef;
pub use symbol_resolver::SymbolPathResolver;
#[cfg(any(test, feature = "test-utils"))]
pub use test_harness::{TestWorkspace, TestWorkspaceBuilder};
pub use use_resolver::{ImportMap, UseResolver};
pub use uuid::Uuid;
pub use var_scope::VarScope;

// Re-export for convenience
pub use serde;
pub use slotmap;