pub struct ChainProcessor { /* private fields */ }Expand description
Composes multiple processors in order — output flows through each stage.
Implementations§
Source§impl ChainProcessor
impl ChainProcessor
Sourcepub fn new(processors: Vec<Box<dyn OutputProcessor>>) -> Self
pub fn new(processors: Vec<Box<dyn OutputProcessor>>) -> Self
Create a chain from a list of processors.
Trait Implementations§
Source§impl OutputProcessor for ChainProcessor
impl OutputProcessor for ChainProcessor
Auto Trait Implementations§
impl Freeze for ChainProcessor
impl !RefUnwindSafe for ChainProcessor
impl Send for ChainProcessor
impl Sync for ChainProcessor
impl Unpin for ChainProcessor
impl UnsafeUnpin for ChainProcessor
impl !UnwindSafe for ChainProcessor
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> OutputTransformer for Twhere
T: OutputProcessor + 'static,
impl<T> OutputTransformer for Twhere
T: OutputProcessor + 'static,
Source§fn transform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
output: String,
_tool_name: &'life1 str,
_state: &'life2 AgentState,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn transform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
output: String,
_tool_name: &'life1 str,
_state: &'life2 AgentState,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Transform tool output, optionally using context about which tool
produced it and the current agent state. Read more