Skip to main content

AsAsyncDispatcherRef

Trait AsAsyncDispatcherRef 

Source
pub trait AsAsyncDispatcherRef: Send + Sync {
    // Required method
    fn as_async_dispatcher_ref(&self) -> AsyncDispatcherRef<'_>;

    // Provided method
    fn post_task_sync(&self, p: impl TaskCallback) -> Result<(), Status> { ... }
}
Expand description

A trait for things that can be represented as an AsyncDispatcherRef.

Required Methods§

Source

fn as_async_dispatcher_ref(&self) -> AsyncDispatcherRef<'_>

Gets an AsyncDispatcherRef corresponding to this object.

Provided Methods§

Source

fn post_task_sync(&self, p: impl TaskCallback) -> Result<(), Status>

Schedules the callback [p] to be run on this dispatcher later.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> AsAsyncDispatcherRef for Arc<T>

Implementors§