pub struct MemoryPack { /* private fields */ }Implementations§
Source§impl MemoryPack
impl MemoryPack
pub fn new(runtime: KhiveRuntime) -> Self
Trait Implementations§
Source§impl Pack for MemoryPack
impl Pack for MemoryPack
Source§const NOTE_KINDS: &'static [&'static str]
const NOTE_KINDS: &'static [&'static str]
Note kinds this pack contributes to the runtime vocabulary.
Source§const ENTITY_KINDS: &'static [&'static str]
const ENTITY_KINDS: &'static [&'static str]
Entity kinds this pack contributes to the runtime vocabulary.
Source§const VERBS: &'static [VerbDef]
const VERBS: &'static [VerbDef]
Verbs this pack handles. The runtime routes verb calls to the pack
that declares them.
Source§const REQUIRES: &'static [&'static str]
const REQUIRES: &'static [&'static str]
Other pack names whose vocabulary this pack references (ADR-037). Read more
Source§const EDGE_RULES: &'static [EdgeEndpointRule] = _
const EDGE_RULES: &'static [EdgeEndpointRule] = _
Additional edge endpoint rules this pack contributes (ADR-031). Read more
Source§impl PackRuntime for MemoryPack
impl PackRuntime for MemoryPack
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 verbs(&self) -> &'static [VerbDef]
fn verbs(&self) -> &'static [VerbDef]
Verbs this pack handles — must equal
<Self as Pack>::VERBS.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 dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
verb: &'life1 str,
params: Value,
registry: &'life2 VerbRegistry,
) -> Pin<Box<dyn Future<Output = Result<Value, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
verb: &'life1 str,
params: Value,
registry: &'life2 VerbRegistry,
) -> Pin<Box<dyn Future<Output = Result<Value, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dispatch a verb call. Returns serialized JSON response. Read more
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).Auto Trait Implementations§
impl Freeze for MemoryPack
impl !RefUnwindSafe for MemoryPack
impl Send for MemoryPack
impl Sync for MemoryPack
impl Unpin for MemoryPack
impl UnsafeUnpin for MemoryPack
impl !UnwindSafe for MemoryPack
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