pub struct PluginExecutor {
pub registry: Arc<dyn PluginRegistry>,
}Expand description
插件执行器
Fields§
§registry: Arc<dyn PluginRegistry>Implementations§
Source§impl PluginExecutor
impl PluginExecutor
Sourcepub fn new(registry: Arc<dyn PluginRegistry>) -> Self
pub fn new(registry: Arc<dyn PluginRegistry>) -> Self
创建插件执行器
Sourcepub async fn execute_stage(
&self,
stage: PluginStage,
ctx: &AgentContext,
) -> AgentResult<()>
pub async fn execute_stage( &self, stage: PluginStage, ctx: &AgentContext, ) -> AgentResult<()>
执行指定阶段的所有插件
Sourcepub async fn execute_pre_request(
&self,
input: AgentInput,
ctx: &AgentContext,
) -> AgentResult<AgentInput>
pub async fn execute_pre_request( &self, input: AgentInput, ctx: &AgentContext, ) -> AgentResult<AgentInput>
执行PreRequest阶段的所有插件
Sourcepub async fn execute_post_response(
&self,
output: AgentOutput,
ctx: &AgentContext,
) -> AgentResult<AgentOutput>
pub async fn execute_post_response( &self, output: AgentOutput, ctx: &AgentContext, ) -> AgentResult<AgentOutput>
执行PostResponse阶段的所有插件
Auto Trait Implementations§
impl Freeze for PluginExecutor
impl !RefUnwindSafe for PluginExecutor
impl Send for PluginExecutor
impl Sync for PluginExecutor
impl Unpin for PluginExecutor
impl UnsafeUnpin for PluginExecutor
impl !UnwindSafe for PluginExecutor
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