ryo-analysis 0.1.0

Code graph and discovery engine for the RYO project
Documentation
//! FileId - Internal high-speed file identifier.
//!
//! Uses SlotMap for O(1) operations with generation counting for dangling detection.

use slotmap::new_key_type;

new_key_type! {
    /// Internal file identifier for fast processing.
    ///
    /// # Properties
    /// - O(1) comparison and hashing
    /// - Generation counter for dangling detection
    /// - 8 bytes fixed size
    ///
    /// # Important: Only obtain through FileRegistry
    ///
    /// FileId must always be obtained through `FileRegistry::register()` or
    /// `FileRegistry::lookup()`. Direct creation is prohibited.
    ///
    /// ```rust,ignore
    /// // Correct usage
    /// let id = file_registry.register(path, crate_name);
    /// let id = file_registry.lookup(&path)?;
    ///
    /// // Prohibited: Direct creation
    /// // let id = FileId::default();  // Compiles but prohibited
    /// ```
    pub struct FileId;
}