pub struct TaskSpawnerBundle(/* private fields */);Expand description
Builder the plugin! macro uses to collect one lane per declared task
type into an AnyTaskSpawner. Kept separate so the macro never has to
name the erased-lane type.
Implementations§
Source§impl TaskSpawnerBundle
impl TaskSpawnerBundle
pub fn new() -> Self
Sourcepub fn push<T: Send + 'static>(&mut self, spawner: TaskSpawner<T>)
pub fn push<T: Send + 'static>(&mut self, spawner: TaskSpawner<T>)
Add one task type’s spawner to the bundle.
Sourcepub fn into_any(self) -> Option<AnyTaskSpawner>
pub fn into_any(self) -> Option<AnyTaskSpawner>
Finish: Some bundle, or None when no lanes were added (a plugin
that declared no tasks), matching the Option<AnyTaskSpawner> the
shell threads through.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TaskSpawnerBundle
impl !UnwindSafe for TaskSpawnerBundle
impl Freeze for TaskSpawnerBundle
impl Send for TaskSpawnerBundle
impl Sync for TaskSpawnerBundle
impl Unpin for TaskSpawnerBundle
impl UnsafeUnpin for TaskSpawnerBundle
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