kitt_score 0.1.0

Decision engine at the core of Project KITT — in-memory stateful matching with pluggable scoring backends.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Trigger event — may carry context attributes but does not mutate state. See spec §3.2.

use crate::event::attr_set::AttrSet;
use crate::event::kind_ref::KindRef;
use crate::LocId;

/// Spec §3.2: a trigger event may carry attributes (e.g., a VAST request
/// with context) but does not mutate state. Attributes are available to the
/// scorer via `LocationView::trigger_attrs`.
#[derive(Clone, Debug)]
pub struct Trigger<'a> {
    /// The location at which scoring is triggered.
    pub location: LocId,
    /// The event kind that activates scoring.
    pub kind: KindRef<'a>,
    /// Context attributes available to the scorer.
    pub attrs: AttrSet<'a>,
}