pub struct TokioReactor;Expand description
Production reactor wrapping a Tokio current_thread runtime.
Trait Implementations§
Source§impl Clone for TokioReactor
impl Clone for TokioReactor
Source§fn clone(&self) -> TokioReactor
fn clone(&self) -> TokioReactor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for TokioReactor
impl Default for TokioReactor
Source§fn default() -> TokioReactor
fn default() -> TokioReactor
Returns the “default value” for a type. Read more
Source§impl Reactor for TokioReactor
impl Reactor for TokioReactor
Source§fn spawn_local(
&self,
fut: Pin<Box<dyn Future<Output = ()> + Send + 'static>>,
) -> Box<dyn SpawnHandle>
fn spawn_local( &self, fut: Pin<Box<dyn Future<Output = ()> + Send + 'static>>, ) -> Box<dyn SpawnHandle>
Spawn a task local to the current thread.
Source§fn spawn(
&self,
fut: Pin<Box<dyn Future<Output = ()> + Send + 'static>>,
) -> Box<dyn SpawnHandle>
fn spawn( &self, fut: Pin<Box<dyn Future<Output = ()> + Send + 'static>>, ) -> Box<dyn SpawnHandle>
Spawn a task that can run on any thread.
Source§fn yield_now(&self) -> Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>
fn yield_now(&self) -> Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>
Yield execution back to the scheduler.
Source§fn sleep(
&self,
duration: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>
fn sleep( &self, duration: Duration, ) -> Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>
Sleep for
duration under the current time model.Source§fn elapsed_since(&self, start: Instant) -> u64
fn elapsed_since(&self, start: Instant) -> u64
Measures nanoseconds elapsed since
start.impl Reactor for TokioReactor
Auto Trait Implementations§
impl Freeze for TokioReactor
impl RefUnwindSafe for TokioReactor
impl Send for TokioReactor
impl Sync for TokioReactor
impl Unpin for TokioReactor
impl UnsafeUnpin for TokioReactor
impl UnwindSafe for TokioReactor
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