pub struct CallableInvoker { /* private fields */ }Expand description
CallableInvoker - Invokes callables from a registry
This is the core mechanism for callable-within-callable invocation.
Implementations§
Source§impl CallableInvoker
impl CallableInvoker
Sourcepub fn new(registry: CallableRegistry) -> Self
pub fn new(registry: CallableRegistry) -> Self
Create a new invoker with a registry
Sourcepub fn register_descriptor(&mut self, descriptor: CallableDescriptor)
pub fn register_descriptor(&mut self, descriptor: CallableDescriptor)
Register a descriptor for a callable
Sourcepub fn get(&self, name: &str) -> Option<DynCallable>
pub fn get(&self, name: &str) -> Option<DynCallable>
Get a callable from the registry
Sourcepub async fn invoke(
&self,
invocation: CallableInvocation,
) -> CallableInvocationResult
pub async fn invoke( &self, invocation: CallableInvocation, ) -> CallableInvocationResult
Invoke a callable by name
Sourcepub fn discover(&self, query: DiscoveryQuery) -> DiscoveryResult
pub fn discover(&self, query: DiscoveryQuery) -> DiscoveryResult
Discover callables matching a query
Auto Trait Implementations§
impl Freeze for CallableInvoker
impl RefUnwindSafe for CallableInvoker
impl Send for CallableInvoker
impl Sync for CallableInvoker
impl Unpin for CallableInvoker
impl UnsafeUnpin for CallableInvoker
impl UnwindSafe for CallableInvoker
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