pub struct CallingThreadDispatcher;Expand description
Dispatcher that runs the task immediately on the calling thread by
using tokio::task::spawn_blocking to drive the future to completion
inline. Mostly useful in tests.
Trait Implementations§
Source§impl Dispatcher for CallingThreadDispatcher
impl Dispatcher for CallingThreadDispatcher
fn spawn_task(&self, task: BoxFuture<'static, ()>) -> DispatcherHandle
fn throughput(&self) -> u32
Source§fn throughput_deadline(&self) -> Option<Duration>
fn throughput_deadline(&self) -> Option<Duration>
None is unbounded.Auto Trait Implementations§
impl Freeze for CallingThreadDispatcher
impl RefUnwindSafe for CallingThreadDispatcher
impl Send for CallingThreadDispatcher
impl Sync for CallingThreadDispatcher
impl Unpin for CallingThreadDispatcher
impl UnsafeUnpin for CallingThreadDispatcher
impl UnwindSafe for CallingThreadDispatcher
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