pub trait ToolImplementationFactory: Send + Sync {
// Required methods
fn descriptor(&self) -> &ToolImplementationDescriptor;
fn bind<'life0, 'async_trait>(
&'life0 self,
request: ToolBindingRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Tool>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn validate_binding(&self, _resource: &ToolBindingResource) -> Result<()> { ... }
}Expand description
Trusted executable registration. Binding may initialize local resources but discovery and descriptor access remain side-effect free.
Required Methods§
fn descriptor(&self) -> &ToolImplementationDescriptor
fn bind<'life0, 'async_trait>(
&'life0 self,
request: ToolBindingRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Tool>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn validate_binding(&self, _resource: &ToolBindingResource) -> Result<()>
fn validate_binding(&self, _resource: &ToolBindingResource) -> Result<()>
Implementation-specific checks that require no execution or secret access.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".