pub struct ToolDispatcher { /* private fields */ }Expand description
Exact-name registry and governed dispatch boundary.
Implementations§
Source§impl ToolDispatcher
impl ToolDispatcher
pub fn new() -> Self
pub fn register( &mut self, entry: &ToolEntry, handler: Arc<dyn ToolHandler>, ) -> Result<()>
Sourcepub fn validate_complete(&self, catalog: &dyn ToolCatalog) -> Result<()>
pub fn validate_complete(&self, catalog: &dyn ToolCatalog) -> Result<()>
Require a handler for every catalog entry and reject orphan handlers.
pub fn concurrency_class(&self, name: &str) -> Option<ConcurrencyClass>
pub async fn dispatch( &self, entry: &ToolEntry, context: &HandlerContext, arguments: &Value, provider: &str, ) -> Result<ToolExecution>
Trait Implementations§
Source§impl Debug for ToolDispatcher
impl Debug for ToolDispatcher
Source§impl Default for ToolDispatcher
impl Default for ToolDispatcher
Source§fn default() -> ToolDispatcher
fn default() -> ToolDispatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ToolDispatcher
impl !RefUnwindSafe for ToolDispatcher
impl Send for ToolDispatcher
impl Sync for ToolDispatcher
impl Unpin for ToolDispatcher
impl UnsafeUnpin for ToolDispatcher
impl !UnwindSafe for ToolDispatcher
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.