khive_pack_template/
lib.rs1pub mod handlers;
6mod pack;
7pub mod vocab;
8
9use khive_runtime::KhiveRuntime;
10use khive_types::{HandlerDef, Pack};
11
12pub(crate) use pack::TEMPLATE_HANDLERS;
13
14pub(crate) const PACK_NAME: &str = "template";
16
17pub struct TemplatePack {
19 runtime: KhiveRuntime,
20}
21
22impl Pack for TemplatePack {
23 const NAME: &'static str = PACK_NAME;
24 const NOTE_KINDS: &'static [&'static str] = vocab::NOTE_KINDS;
26 const ENTITY_KINDS: &'static [&'static str] = vocab::ENTITY_KINDS;
28 const HANDLERS: &'static [HandlerDef] = &TEMPLATE_HANDLERS;
30 const REQUIRES: &'static [&'static str] = &["kg"];
32}
33
34impl TemplatePack {
35 pub fn new(runtime: KhiveRuntime) -> Self {
37 Self { runtime }
38 }
39 pub(crate) fn runtime(&self) -> &KhiveRuntime {
40 &self.runtime
41 }
42}