pub struct TaskManager { /* private fields */ }Expand description
It holds all collections.
struct MyState {
// Keep it in your app's state.
manager: TaskManager,
// ...
}You need to call TaskManager::add_collection for all collection you want to have.
If you will try to TaskManager::push_task to a collection that has not been added the
method will panic
Implementations§
Source§impl TaskManager
impl TaskManager
Sourcepub fn add_collection<'c, C>(&mut self, context: C::Context) -> &mut Self
pub fn add_collection<'c, C>(&mut self, context: C::Context) -> &mut Self
Adds a new collection and handles its results.
It must be called in the beginning of the update function.
Trait Implementations§
Source§impl Default for TaskManager
impl Default for TaskManager
Source§fn default() -> TaskManager
fn default() -> TaskManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TaskManager
impl !RefUnwindSafe for TaskManager
impl !Send for TaskManager
impl !Sync for TaskManager
impl Unpin for TaskManager
impl !UnwindSafe for TaskManager
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