khive_pack_session/
lib.rs1pub mod handlers;
14pub mod mirror;
15mod pack;
16pub mod vocab;
17
18use khive_runtime::KhiveRuntime;
19use khive_types::{HandlerDef, Pack, PackSchemaPlan};
20
21pub(crate) use vocab::{SESSION_HANDLERS, SESSION_SCHEMA_PLAN_STMTS};
22
23pub struct SessionPack {
25 runtime: KhiveRuntime,
26}
27
28impl Pack for SessionPack {
29 const NAME: &'static str = "session";
30 const NOTE_KINDS: &'static [&'static str] = &["session"];
31 const ENTITY_KINDS: &'static [&'static str] = &[];
32 const HANDLERS: &'static [HandlerDef] = &SESSION_HANDLERS;
33 const REQUIRES: &'static [&'static str] = &["kg"];
34 const SCHEMA_PLAN: Option<PackSchemaPlan> = Some(PackSchemaPlan {
35 pack: "session",
36 statements: &SESSION_SCHEMA_PLAN_STMTS,
37 });
38}
39
40impl SessionPack {
41 pub fn new(runtime: KhiveRuntime) -> Self {
43 Self { runtime }
44 }
45
46 pub(crate) fn runtime(&self) -> &KhiveRuntime {
47 &self.runtime
48 }
49}