pub struct BatchNode<C: Context, N: Node<C>> {
pub node: N,
pub batch_size: usize,
/* private fields */
}Expand description
A node adapter that runs an inner node on a batch of inputs, collecting outputs in parallel
Fields§
§node: N§batch_size: usizeImplementations§
Trait Implementations§
Source§impl<C, N> Node<C> for BatchNode<C, N>
impl<C, N> Node<C> for BatchNode<C, N>
Source§fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 C,
inputs: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Transition<Self::Output>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 C,
inputs: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Transition<Self::Output>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process an input value within the given context, producing a transition
Auto Trait Implementations§
impl<C, N> Freeze for BatchNode<C, N>where
N: Freeze,
impl<C, N> RefUnwindSafe for BatchNode<C, N>where
N: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, N> Send for BatchNode<C, N>
impl<C, N> Sync for BatchNode<C, N>
impl<C, N> Unpin for BatchNode<C, N>
impl<C, N> UnwindSafe for BatchNode<C, N>where
N: UnwindSafe,
C: 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