pub(crate) trait TaskOnce: Send {
// Required method
fn run_once(self, cx: &mut JSContext);
// Provided method
fn name(&self) -> &'static str { ... }
}Expand description
A task that can be sent between threads and run. The name method is for profiling purposes.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl TaskOnce for BufferedAmountTask
impl TaskOnce for CSPViolationReportTask
Corresponds to the operation in 5.5 Report Violation https://w3c.github.io/webappsec-csp/#report-violation
Queue a task to run the following steps: