pub(crate) struct LocalOwnedTasks<S: 'static> {
inner: UnsafeCell<OwnedTasksInner<S>>,
pub(crate) id: NonZeroU64,
_not_send_or_sync: PhantomData<*const ()>,
}
Fields§
§inner: UnsafeCell<OwnedTasksInner<S>>
§id: NonZeroU64
§_not_send_or_sync: PhantomData<*const ()>
Implementations§
source§impl<S: 'static> LocalOwnedTasks<S>
impl<S: 'static> LocalOwnedTasks<S>
pub(crate) fn new() -> Self
pub(crate) fn bind<T>( &self, task: T, scheduler: S, id: Id, ) -> (JoinHandle<T::Output>, Option<Notified<S>>)
sourcepub(crate) fn close_and_shutdown_all(&self)where
S: Schedule,
pub(crate) fn close_and_shutdown_all(&self)where
S: Schedule,
Shuts down all tasks in the collection. This call also closes the collection, preventing new items from being added.
pub(crate) fn remove(&self, task: &Task<S>) -> Option<Task<S>>
sourcepub(crate) fn assert_owner(&self, task: Notified<S>) -> LocalNotified<S>
pub(crate) fn assert_owner(&self, task: Notified<S>) -> LocalNotified<S>
Asserts that the given task is owned by this LocalOwnedTasks
and convert
it to a LocalNotified
, giving the thread permission to poll this task.
fn with_inner<F, T>(&self, f: F) -> Twhere
F: FnOnce(&mut OwnedTasksInner<S>) -> T,
pub(crate) fn is_closed(&self) -> bool
pub(crate) fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<S> !Freeze for LocalOwnedTasks<S>
impl<S> !RefUnwindSafe for LocalOwnedTasks<S>
impl<S> !Send for LocalOwnedTasks<S>
impl<S> !Sync for LocalOwnedTasks<S>
impl<S> Unpin for LocalOwnedTasks<S>
impl<S> !UnwindSafe for LocalOwnedTasks<S>
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