pub struct AgentRegistrar<'a> { /* private fields */ }Expand description
Scoped registrar a plugin contributes through during activation; permissions are checked per call.
Implementations§
Source§impl AgentRegistrar<'_>
impl AgentRegistrar<'_>
Sourcepub fn prompt(
&mut self,
id: impl Into<String>,
prompt: impl Into<String>,
) -> Result<(), PluginError>
pub fn prompt( &mut self, id: impl Into<String>, prompt: impl Into<String>, ) -> Result<(), PluginError>
Register a prompt section under the plugin’s authority.
Sourcepub fn context(
&mut self,
contributor: Arc<dyn ContextContributor>,
) -> Result<(), PluginError>
pub fn context( &mut self, contributor: Arc<dyn ContextContributor>, ) -> Result<(), PluginError>
Register a context contributor.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AgentRegistrar<'a>
impl<'a> !UnwindSafe for AgentRegistrar<'a>
impl<'a> Freeze for AgentRegistrar<'a>
impl<'a> Send for AgentRegistrar<'a>
impl<'a> Sync for AgentRegistrar<'a>
impl<'a> Unpin for AgentRegistrar<'a>
impl<'a> UnsafeUnpin for AgentRegistrar<'a>
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