pub enum Dispatch {
Inline,
SpawnBlocking,
}Expand description
How BlockingSink hands off calls to the wrapped
SyncProjectionSink.
Variants§
Inline
Run the sync method inline on the async worker.
Safe only when the method is guaranteed to return in a few hundred microseconds or less. Anything else blocks the runtime.
SpawnBlocking
Offload to tokio::task::spawn_blocking.
The default. Correct for any sink that touches the file system, synchronous DB drivers, or otherwise blocking code.
Trait Implementations§
impl Copy for Dispatch
impl Eq for Dispatch
impl StructuralPartialEq for Dispatch
Auto Trait Implementations§
impl Freeze for Dispatch
impl RefUnwindSafe for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl UnsafeUnpin for Dispatch
impl UnwindSafe for Dispatch
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