pub struct VerbRegistry { /* private fields */ }Expand description
Immutable registry that dispatches verb calls to registered packs.
Clone is cheap (Arc-wrapped). Constructed via VerbRegistryBuilder.
Implementations§
Source§impl VerbRegistry
impl VerbRegistry
Sourcepub async fn dispatch(
&self,
verb: &str,
params: Value,
) -> Result<Value, RuntimeError>
pub async fn dispatch( &self, verb: &str, params: Value, ) -> Result<Value, RuntimeError>
Dispatch a verb to the first pack that handles it.
When multiple packs declare the same verb, the first registered pack wins.
Sourcepub fn all_note_kinds(&self) -> Vec<&'static str>
pub fn all_note_kinds(&self) -> Vec<&'static str>
Merged set of note kinds across all registered packs (deduplicated, first-seen order preserved).
Sourcepub fn all_entity_kinds(&self) -> Vec<&'static str>
pub fn all_entity_kinds(&self) -> Vec<&'static str>
Merged set of entity kinds across all registered packs (deduplicated, first-seen order preserved).
Trait Implementations§
Source§impl Clone for VerbRegistry
impl Clone for VerbRegistry
Source§fn clone(&self) -> VerbRegistry
fn clone(&self) -> VerbRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VerbRegistry
impl !RefUnwindSafe for VerbRegistry
impl Send for VerbRegistry
impl Sync for VerbRegistry
impl Unpin for VerbRegistry
impl UnsafeUnpin for VerbRegistry
impl !UnwindSafe for VerbRegistry
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