pub struct TaskSpawner { /* private fields */ }Implementations§
Source§impl TaskSpawner
impl TaskSpawner
pub fn new(idenitfier: String) -> Self
Sourcepub fn spawn<F>(&self, task: F) -> TaskHandle<F::Output>
pub fn spawn<F>(&self, task: F) -> TaskHandle<F::Output>
Spawn task.
Sourcepub fn spawn_named<F>(&self, name: &str, task: F) -> TaskHandle<F::Output>
pub fn spawn_named<F>(&self, name: &str, task: F) -> TaskHandle<F::Output>
Spawn task.
Sourcepub fn spawn_options<F>(
&self,
options: TaskOptions,
task: F,
) -> TaskHandle<F::Output>
pub fn spawn_options<F>( &self, options: TaskOptions, task: F, ) -> TaskHandle<F::Output>
Spawn task.
Sourcepub fn spawn_blocking<F, R>(
&self,
options: TaskOptions,
task: F,
) -> TaskHandle<R>
pub fn spawn_blocking<F, R>( &self, options: TaskOptions, task: F, ) -> TaskHandle<R>
Spawn blocking task.
pub fn tracker(&self) -> TaskTracker
Trait Implementations§
Source§impl Clone for TaskSpawner
impl Clone for TaskSpawner
Source§fn clone(&self) -> TaskSpawner
fn clone(&self) -> TaskSpawner
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 Debug for TaskSpawner
impl Debug for TaskSpawner
Auto Trait Implementations§
impl Freeze for TaskSpawner
impl RefUnwindSafe for TaskSpawner
impl Send for TaskSpawner
impl Sync for TaskSpawner
impl Unpin for TaskSpawner
impl UnsafeUnpin for TaskSpawner
impl UnwindSafe for TaskSpawner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more