pub struct TemplatePack { /* private fields */ }Expand description
Template pack — replace with your pack’s struct name and logic.
Implementations§
Source§impl TemplatePack
impl TemplatePack
pub fn new(runtime: KhiveRuntime) -> Self
Trait Implementations§
Source§impl Pack for TemplatePack
impl Pack for TemplatePack
Source§const NOTE_KINDS: &'static [&'static str] = vocab::NOTE_KINDS
const NOTE_KINDS: &'static [&'static str] = vocab::NOTE_KINDS
Declare note kinds this pack contributes. Must not overlap with other packs.
Source§const ENTITY_KINDS: &'static [&'static str] = vocab::ENTITY_KINDS
const ENTITY_KINDS: &'static [&'static str] = vocab::ENTITY_KINDS
Declare entity kinds this pack contributes. Must not overlap with other packs.
Source§const HANDLERS: &'static [HandlerDef]
const HANDLERS: &'static [HandlerDef]
Handler table. Each entry is one verb or subhandler the pack can dispatch.
Source§const REQUIRES: &'static [&'static str]
const REQUIRES: &'static [&'static str]
Pack dependencies. The named packs must be in the configured KHIVE_PACKS list.
Source§const EDGE_RULES: &'static [EdgeEndpointRule] = _
const EDGE_RULES: &'static [EdgeEndpointRule] = _
Additional edge endpoint rules this pack contributes (ADR-031). Read more
Source§const NOTE_KIND_SPECS: &'static [NoteKindSpec] = _
const NOTE_KIND_SPECS: &'static [NoteKindSpec] = _
Lifecycle and schema specs for note kinds this pack owns (ADR-004). Read more
Source§const SCHEMA_PLAN: Option<PackSchemaPlan> = None
const SCHEMA_PLAN: Option<PackSchemaPlan> = None
Pack-auxiliary schema plan (ADR-019). Read more
Source§const VALIDATION_RULES: &'static [&'static str] = _
const VALIDATION_RULES: &'static [&'static str] = _
Validation rule IDs contributed by this pack (ADR-034). Read more
Source§impl PackRuntime for TemplatePack
impl PackRuntime for TemplatePack
Source§fn dispatch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
verb: &'life1 str,
params: Value,
_registry: &'life2 VerbRegistry,
token: &'life3 NamespaceToken,
) -> Pin<Box<dyn Future<Output = Result<Value, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn dispatch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
verb: &'life1 str,
params: Value,
_registry: &'life2 VerbRegistry,
token: &'life3 NamespaceToken,
) -> Pin<Box<dyn Future<Output = Result<Value, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dispatch a verb call. Add a match arm for each entry in HANDLERS.
Source§fn note_kinds(&self) -> &'static [&'static str]
fn note_kinds(&self) -> &'static [&'static str]
Note kinds this pack owns — must equal
<Self as Pack>::NOTE_KINDS.Source§fn entity_kinds(&self) -> &'static [&'static str]
fn entity_kinds(&self) -> &'static [&'static str]
Entity kinds this pack owns — must equal
<Self as Pack>::ENTITY_KINDS.Source§fn handlers(&self) -> &'static [HandlerDef]
fn handlers(&self) -> &'static [HandlerDef]
Handlers this pack registers — must equal
<Self as Pack>::HANDLERS.Source§fn requires(&self) -> &'static [&'static str]
fn requires(&self) -> &'static [&'static str]
Pack names whose vocabulary this pack references (ADR-037).
Defaults to empty so existing packs compile without changes.
Source§fn edge_rules(&self) -> &'static [EdgeEndpointRule]
fn edge_rules(&self) -> &'static [EdgeEndpointRule]
Pack-extensible edge endpoint rules — must equal
<Self as Pack>::EDGE_RULES.
Defaults to empty so existing packs that don’t extend the edge contract
can ignore it (ADR-031).Source§fn note_kind_specs(&self) -> &'static [NoteKindSpec]
fn note_kind_specs(&self) -> &'static [NoteKindSpec]
NoteKindSpec declarations for note kinds this pack owns (ADR-004). Read more
Source§fn kind_hook(&self, _kind: &str) -> Option<Arc<dyn KindHook>>
fn kind_hook(&self, _kind: &str) -> Option<Arc<dyn KindHook>>
Optional per-kind hook for shared CRUD specialization (ADR-030). Read more
Source§fn schema_plan(&self) -> SchemaPlan
fn schema_plan(&self) -> SchemaPlan
Pack-auxiliary schema (ADR-017 §Storage profile and pack-auxiliary schema). Read more
Source§fn validation_rules(&self) -> &'static [ValidationRule]
fn validation_rules(&self) -> &'static [ValidationRule]
Domain-specific validation rules contributed by this pack (ADR-034 §9). Read more
Source§fn register_embedders(&self, _runtime: &KhiveRuntime)
fn register_embedders(&self, _runtime: &KhiveRuntime)
Register custom embedding providers with the runtime (ADR-031 extension). Read more
Auto Trait Implementations§
impl Freeze for TemplatePack
impl !RefUnwindSafe for TemplatePack
impl Send for TemplatePack
impl Sync for TemplatePack
impl Unpin for TemplatePack
impl UnsafeUnpin for TemplatePack
impl !UnwindSafe for TemplatePack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more