Trait script::task_source::TaskSource
source · pub trait TaskSource {
const NAME: TaskSourceName;
// Required method
fn queue_with_canceller<T>(
&self,
task: T,
canceller: &TaskCanceller,
) -> Result<(), ()>
where T: TaskOnce + 'static;
// Provided method
fn queue<T>(&self, task: T, global: &GlobalScope) -> Result<(), ()>
where T: TaskOnce + 'static { ... }
}
Required Associated Constants§
const NAME: TaskSourceName
Required Methods§
fn queue_with_canceller<T>(
&self,
task: T,
canceller: &TaskCanceller,
) -> Result<(), ()>where
T: TaskOnce + 'static,
Provided Methods§
fn queue<T>(&self, task: T, global: &GlobalScope) -> Result<(), ()>where
T: TaskOnce + 'static,
Object Safety§
This trait is not object safe.