pub struct RunnablePassthrough<I: Send + Sync + 'static> { /* private fields */ }Expand description
Implementations§
Trait Implementations§
Source§impl<I: Clone + Send + Sync + 'static> Runnable<I, I> for RunnablePassthrough<I>
impl<I: Clone + Send + Sync + 'static> Runnable<I, I> for RunnablePassthrough<I>
Source§fn stream<'life0, 'async_trait>(
&'life0 self,
input: I,
_config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<I, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream<'life0, 'async_trait>(
&'life0 self,
input: I,
_config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<I, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Passthrough supports true streaming: each input item is forwarded immediately without buffering.
Source§fn transform<'life0, 'async_trait>(
&'life0 self,
input: Pin<Box<dyn Stream<Item = Result<I, LcelError>> + Send>>,
_config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<I, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transform<'life0, 'async_trait>(
&'life0 self,
input: Pin<Box<dyn Stream<Item = Result<I, LcelError>> + Send>>,
_config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<I, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Passthrough supports true transform: each item in the input stream is forwarded immediately.
Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
input: I,
_config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<I, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
input: I,
_config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<I, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Transforms single input to output. Read more
Source§fn batch<'life0, 'async_trait>(
&'life0 self,
inputs: Vec<Input>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Output>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn batch<'life0, 'async_trait>(
&'life0 self,
inputs: Vec<Input>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Output>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Batch processing - transforms multiple inputs to outputs. Read more
Auto Trait Implementations§
impl<I> Freeze for RunnablePassthrough<I>
impl<I> RefUnwindSafe for RunnablePassthrough<I>where
I: RefUnwindSafe,
impl<I> Send for RunnablePassthrough<I>
impl<I> Sync for RunnablePassthrough<I>
impl<I> Unpin for RunnablePassthrough<I>where
I: Unpin,
impl<I> UnsafeUnpin for RunnablePassthrough<I>
impl<I> UnwindSafe for RunnablePassthrough<I>where
I: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<I, O, R> RunnableExt<I, O> for R
impl<I, O, R> RunnableExt<I, O> for R
Source§fn pipe<O2, R2>(self, other: R2) -> RunnableSequence<Input, O2>
fn pipe<O2, R2>(self, other: R2) -> RunnableSequence<Input, O2>
Pipe the output of this runnable into another runnable. Read more
Source§fn into_sequence(self) -> RunnableSequence<Input, Output>
fn into_sequence(self) -> RunnableSequence<Input, Output>
Create a
RunnableSequence from this runnable as a single step. Read more