pub struct RunnableAnyWrapper<I, O, R>{ /* private fields */ }Expand description
Wrapper that implements RunnableAny for any Runnable<I, O>.
We use a concrete wrapper struct instead of a blanket impl because
Rust’s orphan rules and type parameter constraints make a blanket
impl<I, O, R> RunnableAny for R impossible (I and O would be
unconstrained).
Implementations§
Trait Implementations§
Source§impl<I, O, R> RunnableAny for RunnableAnyWrapper<I, O, R>
impl<I, O, R> RunnableAny for RunnableAnyWrapper<I, O, R>
Source§fn invoke_any<'life0, 'async_trait>(
&'life0 self,
input: Box<dyn Any + Send>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Any + Send>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_any<'life0, 'async_trait>(
&'life0 self,
input: Box<dyn Any + Send>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Any + Send>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Type-erased invoke:
Box<dyn Any + Send> → Box<dyn Any + Send>.Source§fn stream_any<'life0, 'async_trait>(
&'life0 self,
input: Box<dyn Any + Send>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Box<dyn Any + Send>, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_any<'life0, 'async_trait>(
&'life0 self,
input: Box<dyn Any + Send>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Box<dyn Any + Send>, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Type-erased stream:
Box<dyn Any + Send> → Stream of Box<dyn Any + Send>.Source§fn transform_any<'life0, 'async_trait>(
&'life0 self,
input: Pin<Box<dyn Stream<Item = Result<Box<dyn Any + Send>, LcelError>> + Send>>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Box<dyn Any + Send>, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transform_any<'life0, 'async_trait>(
&'life0 self,
input: Pin<Box<dyn Stream<Item = Result<Box<dyn Any + Send>, LcelError>> + Send>>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Box<dyn Any + Send>, LcelError>> + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn batch_any<'life0, 'async_trait>(
&'life0 self,
inputs: Vec<Box<dyn Any + Send>>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn Any + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn batch_any<'life0, 'async_trait>(
&'life0 self,
inputs: Vec<Box<dyn Any + Send>>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn Any + Send>>, LcelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Type-erased batch:
Vec<Box<dyn Any + Send>> → Vec<Box<dyn Any + Send>>.Auto Trait Implementations§
impl<I, O, R> Freeze for RunnableAnyWrapper<I, O, R>where
R: Freeze,
impl<I, O, R> RefUnwindSafe for RunnableAnyWrapper<I, O, R>
impl<I, O, R> Send for RunnableAnyWrapper<I, O, R>
impl<I, O, R> Sync for RunnableAnyWrapper<I, O, R>
impl<I, O, R> Unpin for RunnableAnyWrapper<I, O, R>
impl<I, O, R> UnsafeUnpin for RunnableAnyWrapper<I, O, R>where
R: UnsafeUnpin,
impl<I, O, R> UnwindSafe for RunnableAnyWrapper<I, O, R>
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