pub struct CompositeToolProvider { /* private fields */ }Expand description
A ToolProvider that aggregates tools from multiple child providers.
Tools from all providers are merged according to the configured
NameCollisionPolicy.
Implementations§
Source§impl CompositeToolProvider
impl CompositeToolProvider
Sourcepub fn new(
providers: Vec<Box<dyn ToolProvider>>,
collision_policy: NameCollisionPolicy,
) -> Self
pub fn new( providers: Vec<Box<dyn ToolProvider>>, collision_policy: NameCollisionPolicy, ) -> Self
Creates a new CompositeToolProvider with the given providers and
collision policy.
Sourcepub fn with_keep_first(providers: Vec<Box<dyn ToolProvider>>) -> Self
pub fn with_keep_first(providers: Vec<Box<dyn ToolProvider>>) -> Self
Creates a CompositeToolProvider with NameCollisionPolicy::KeepFirst.
Trait Implementations§
Source§impl Debug for CompositeToolProvider
impl Debug for CompositeToolProvider
Source§impl ToolProvider for CompositeToolProvider
impl ToolProvider for CompositeToolProvider
Source§fn discover_tools(
&self,
) -> BoxFuture<'_, Result<Vec<Arc<dyn Tool>>, SynwireError>>
fn discover_tools( &self, ) -> BoxFuture<'_, Result<Vec<Arc<dyn Tool>>, SynwireError>>
Returns all tools available from this provider. Read more
Auto Trait Implementations§
impl Freeze for CompositeToolProvider
impl !RefUnwindSafe for CompositeToolProvider
impl Send for CompositeToolProvider
impl Sync for CompositeToolProvider
impl Unpin for CompositeToolProvider
impl UnsafeUnpin for CompositeToolProvider
impl !UnwindSafe for CompositeToolProvider
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