Trait AsAsyncDispatcherRef
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§
fn as_async_dispatcher_ref(&self) -> AsyncDispatcherRef<'_>
fn as_async_dispatcher_ref(&self) -> AsyncDispatcherRef<'_>
Gets an AsyncDispatcherRef corresponding to this object.
Provided Methods§
fn post_task_sync(&self, p: impl TaskCallback) -> Result<(), Status>
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".