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§

Required Methods§

source

fn queue_with_canceller<T>( &self, task: T, canceller: &TaskCanceller, ) -> Result<(), ()>
where T: TaskOnce + 'static,

Provided Methods§

source

fn queue<T>(&self, task: T, global: &GlobalScope) -> Result<(), ()>
where T: TaskOnce + 'static,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl TaskSource for DOMManipulationTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::DOMManipulation

source§

impl TaskSource for FileReadingTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::FileReading

source§

impl TaskSource for GamepadTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::Gamepad

source§

impl TaskSource for HistoryTraversalTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::HistoryTraversal

source§

impl TaskSource for MediaElementTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::MediaElement

source§

impl TaskSource for NetworkingTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::Networking

source§

impl TaskSource for PerformanceTimelineTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::PerformanceTimeline

source§

impl TaskSource for PortMessageQueue

source§

const NAME: TaskSourceName = TaskSourceName::PortMessage

source§

impl TaskSource for RemoteEventTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::RemoteEvent

source§

impl TaskSource for RenderingTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::Rendering

source§

impl TaskSource for TimerTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::Timer

source§

impl TaskSource for UserInteractionTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::UserInteraction

source§

impl TaskSource for WebsocketTaskSource

source§

const NAME: TaskSourceName = TaskSourceName::Websocket