kitt_score 0.1.0

Decision engine at the core of Project KITT — in-memory stateful matching with pluggable scoring backends.
Documentation
//! A way for callers to reference an event kind either by `KindId` (hot path,
//! zero cost) or by `&str` (ergonomic, one interner lookup).

use crate::KindId;

/// References an event kind by interned ID or by name string.
#[derive(Clone, Copy, Debug)]
pub enum KindRef<'a> {
    /// Reference by pre-interned `KindId` — zero cost on the hot path.
    Id(KindId),
    /// Reference by name string — triggers one interner lookup.
    Name(&'a str),
}

impl From<KindId> for KindRef<'_> {
    fn from(id: KindId) -> Self {
        Self::Id(id)
    }
}

impl<'a> From<&'a str> for KindRef<'a> {
    fn from(s: &'a str) -> Self {
        Self::Name(s)
    }
}