pub struct AsyncTaskSystem { /* private fields */ }Expand description
非同期Task システム
Implementations§
Source§impl AsyncTaskSystem
impl AsyncTaskSystem
Sourcepub fn spawn_boxed(&self, task: Box<dyn AsyncTask>) -> TaskId
pub fn spawn_boxed(&self, task: Box<dyn AsyncTask>) -> TaskId
Box
Sourcepub fn collect_results(&self) -> Vec<AsyncTaskResult>
pub fn collect_results(&self) -> Vec<AsyncTaskResult>
完了したTaskの結果を収集(ノンブロッキング)
Sourcepub fn register_factory<F: AsyncTaskFactory + 'static>(
&mut self,
name: &str,
factory: F,
)
pub fn register_factory<F: AsyncTaskFactory + 'static>( &mut self, name: &str, factory: F, )
Task ファクトリを登録(ユーザー拡張ポイント)
Sourcepub fn create_task(
&self,
name: &str,
params: TaskParams,
) -> Option<Box<dyn AsyncTask>>
pub fn create_task( &self, name: &str, params: TaskParams, ) -> Option<Box<dyn AsyncTask>>
ファクトリからTaskを生成
Auto Trait Implementations§
impl Freeze for AsyncTaskSystem
impl !RefUnwindSafe for AsyncTaskSystem
impl Send for AsyncTaskSystem
impl Sync for AsyncTaskSystem
impl Unpin for AsyncTaskSystem
impl !UnwindSafe for AsyncTaskSystem
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> 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