pub struct PluginCatalog { /* private fields */ }Expand description
Registered plugins keyed by id.
Implementations§
Source§impl PluginCatalog
impl PluginCatalog
Sourcepub fn register(
&mut self,
plugin: Arc<dyn AgentPlugin>,
) -> Result<(), PluginError>
pub fn register( &mut self, plugin: Arc<dyn AgentPlugin>, ) -> Result<(), PluginError>
Register a plugin; duplicate ids never replace the first registration.
Sourcepub fn descriptors(&self) -> impl Iterator<Item = PluginDescriptor> + '_
pub fn descriptors(&self) -> impl Iterator<Item = PluginDescriptor> + '_
Redacted descriptors of every plugin.
Sourcepub async fn mount(
&self,
context: &PluginMountContext,
references: &BTreeMap<String, (String, Value)>,
) -> Result<MountedPlugins, PluginError>
pub async fn mount( &self, context: &PluginMountContext, references: &BTreeMap<String, (String, Value)>, ) -> Result<MountedPlugins, PluginError>
Mount the referenced plugins in dependency order, rolling back on failure.
Sourcepub fn validate_references(
&self,
references: &BTreeMap<String, (String, Value)>,
) -> Result<(), PluginError>
pub fn validate_references( &self, references: &BTreeMap<String, (String, Value)>, ) -> Result<(), PluginError>
Report references to unknown plugins, unsatisfied versions and invalid configs.
Trait Implementations§
Source§impl Debug for PluginCatalog
impl Debug for PluginCatalog
Source§impl Default for PluginCatalog
impl Default for PluginCatalog
Source§fn default() -> PluginCatalog
fn default() -> PluginCatalog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PluginCatalog
impl !UnwindSafe for PluginCatalog
impl Freeze for PluginCatalog
impl Send for PluginCatalog
impl Sync for PluginCatalog
impl Unpin for PluginCatalog
impl UnsafeUnpin for PluginCatalog
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