pub struct CallbackSink<F> { /* private fields */ }Expand description
A sink that invokes a user-supplied async function for each batch.
The callback receives a slice of MarketEvent and can process them
however it likes. This is the simplest way to wire up custom logic without
implementing EventSink directly.
Implementations§
Trait Implementations§
Source§impl<F, Fut> EventSink for CallbackSink<F>
impl<F, Fut> EventSink for CallbackSink<F>
Auto Trait Implementations§
impl<F> Freeze for CallbackSink<F>
impl<F> RefUnwindSafe for CallbackSink<F>where
Arc<F>: RefUnwindSafe,
impl<F> Send for CallbackSink<F>
impl<F> Sync for CallbackSink<F>
impl<F> Unpin for CallbackSink<F>
impl<F> UnsafeUnpin for CallbackSink<F>where
Arc<F>: UnsafeUnpin,
impl<F> UnwindSafe for CallbackSink<F>where
Arc<F>: 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