Struct cfx_tasks::TokioTaskExecutor
source · #[non_exhaustive]pub struct TokioTaskExecutor;
Expand description
An TaskSpawner
that uses [tokio::task::spawn
] to execute tasks
Implementations§
source§impl TokioTaskExecutor
impl TokioTaskExecutor
sourcepub fn boxed(self) -> Box<dyn TaskSpawner + 'static>
pub fn boxed(self) -> Box<dyn TaskSpawner + 'static>
Converts the instance to a boxed TaskSpawner
.
Trait Implementations§
source§impl Clone for TokioTaskExecutor
impl Clone for TokioTaskExecutor
source§fn clone(&self) -> TokioTaskExecutor
fn clone(&self) -> TokioTaskExecutor
Returns a copy 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 Debug for TokioTaskExecutor
impl Debug for TokioTaskExecutor
source§impl Default for TokioTaskExecutor
impl Default for TokioTaskExecutor
source§fn default() -> TokioTaskExecutor
fn default() -> TokioTaskExecutor
Returns the “default value” for a type. Read more
source§impl TaskSpawner for TokioTaskExecutor
impl TaskSpawner for TokioTaskExecutor
source§fn spawn(&self, fut: BoxFuture<'static, ()>) -> JoinHandle<()>
fn spawn(&self, fut: BoxFuture<'static, ()>) -> JoinHandle<()>
Spawns the task onto the runtime.
See also [
Handle::spawn
].source§fn spawn_critical(
&self,
_name: &'static str,
fut: BoxFuture<'static, ()>
) -> JoinHandle<()>
fn spawn_critical( &self, _name: &'static str, fut: BoxFuture<'static, ()> ) -> JoinHandle<()>
This spawns a critical task onto the runtime.
source§fn spawn_blocking(&self, fut: BoxFuture<'static, ()>) -> JoinHandle<()>
fn spawn_blocking(&self, fut: BoxFuture<'static, ()>) -> JoinHandle<()>
Spawns a blocking task onto the runtime.
Auto Trait Implementations§
impl RefUnwindSafe for TokioTaskExecutor
impl Send for TokioTaskExecutor
impl Sync for TokioTaskExecutor
impl Unpin for TokioTaskExecutor
impl UnwindSafe for TokioTaskExecutor
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