pub struct AsyncDispatcher<'a, R> { /* private fields */ }Expand description
Like, Dispatcher but works asynchronously.
Implementations§
Source§impl<'a, R> AsyncDispatcher<'a, R>
impl<'a, R> AsyncDispatcher<'a, R>
Sourcepub fn setup(&mut self)
pub fn setup(&mut self)
Sets up all the systems which means they are gonna add default values for the resources they need.
Sourcepub fn dispatch(&mut self)
pub fn dispatch(&mut self)
Dispatches the systems asynchronously. Does not execute thread local systems.
If you want to wait for the systems to finish,
call wait().
Sourcepub fn wait(&mut self)
pub fn wait(&mut self)
Waits for all the asynchronously dispatched systems to finish and executes thread local systems (if there are any).
Sourcepub fn wait_without_tl(&mut self)
pub fn wait_without_tl(&mut self)
Waits for all the asynchronously dispatched systems to finish without executing thread local systems.
See wait for executing thread local systems.
Sourcepub fn running(&mut self) -> bool
pub fn running(&mut self) -> bool
Checks if any of the asynchronously dispatched systems are running.
Sourcepub fn res(&mut self) -> &R
👎Deprecated since 0.8.0: renamed to world
pub fn res(&mut self) -> &R
worldReturns the World.
This will wait for the asynchronous systems to finish.
Renamed to self.world().
Sourcepub fn world(&mut self) -> &R
pub fn world(&mut self) -> &R
Returns the World.
This will wait for the asynchronous systems to finish.
Auto Trait Implementations§
impl<'a, R> Freeze for AsyncDispatcher<'a, R>where
R: Freeze,
impl<'a, R> !RefUnwindSafe for AsyncDispatcher<'a, R>
impl<'a, R> !Send for AsyncDispatcher<'a, R>
impl<'a, R> !Sync for AsyncDispatcher<'a, R>
impl<'a, R> Unpin for AsyncDispatcher<'a, R>where
R: Unpin,
impl<'a, R> !UnwindSafe for AsyncDispatcher<'a, R>
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
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>
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>
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