pub(crate) struct TaskSource<'task_manager> {
pub(crate) task_manager: &'task_manager TaskManager,
pub(crate) name: TaskSourceName,
}
Fields§
§task_manager: &'task_manager TaskManager
§name: TaskSourceName
Implementations§
Source§impl TaskSource<'_>
impl TaskSource<'_>
Sourcepub(crate) fn queue(&self, task: impl TaskOnce + 'static)
pub(crate) fn queue(&self, task: impl TaskOnce + 'static)
Queue a task with the default canceller for this TaskSource
.
Sourcepub(crate) fn queue_unconditionally(&self, task: impl TaskOnce + 'static)
pub(crate) fn queue_unconditionally(&self, task: impl TaskOnce + 'static)
This queues a task that will not be cancelled when its associated global scope gets destroyed.
pub(crate) fn queue_simple_event(&self, target: &EventTarget, name: Atom)
pub(crate) fn queue_event( &self, target: &EventTarget, name: Atom, bubbles: EventBubbles, cancelable: EventCancelable, )
Sourcepub(crate) fn to_sendable(&self) -> SendableTaskSource
pub(crate) fn to_sendable(&self) -> SendableTaskSource
Convert this TaskSource
into a SendableTaskSource
suitable for sending
to different threads.
Trait Implementations§
Source§impl<'task_manager> From<TaskSource<'task_manager>> for SendableTaskSource
impl<'task_manager> From<TaskSource<'task_manager>> for SendableTaskSource
Source§fn from(task_source: TaskSource<'task_manager>) -> Self
fn from(task_source: TaskSource<'task_manager>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'task_manager> Freeze for TaskSource<'task_manager>
impl<'task_manager> !RefUnwindSafe for TaskSource<'task_manager>
impl<'task_manager> !Send for TaskSource<'task_manager>
impl<'task_manager> !Sync for TaskSource<'task_manager>
impl<'task_manager> Unpin for TaskSource<'task_manager>
impl<'task_manager> !UnwindSafe for TaskSource<'task_manager>
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert