pub struct SimplePluginRegistry { /* private fields */ }Expand description
简单插件注册中心实现
Implementations§
Trait Implementations§
Source§impl Default for SimplePluginRegistry
impl Default for SimplePluginRegistry
Source§impl PluginRegistry for SimplePluginRegistry
impl PluginRegistry for SimplePluginRegistry
Source§fn unregister(&self, name: &str) -> AgentResult<bool>
fn unregister(&self, name: &str) -> AgentResult<bool>
移除插件
Source§fn list_by_stage(&self, stage: PluginStage) -> Vec<Arc<dyn Plugin>>
fn list_by_stage(&self, stage: PluginStage) -> Vec<Arc<dyn Plugin>>
列出指定阶段的插件
Source§fn register_all(&self, plugins: Vec<Arc<dyn Plugin>>) -> Result<(), AgentError>
fn register_all(&self, plugins: Vec<Arc<dyn Plugin>>) -> Result<(), AgentError>
批量注册插件
Auto Trait Implementations§
impl !Freeze for SimplePluginRegistry
impl RefUnwindSafe for SimplePluginRegistry
impl Send for SimplePluginRegistry
impl Sync for SimplePluginRegistry
impl Unpin for SimplePluginRegistry
impl UnsafeUnpin for SimplePluginRegistry
impl UnwindSafe for SimplePluginRegistry
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more