pub struct Dispatcher(/* private fields */);
Implementations§
Source§impl Dispatcher
impl Dispatcher
Sourcepub fn is_unsynchronized(&self) -> bool
pub fn is_unsynchronized(&self) -> bool
Whether this dispatcher’s tasks and futures can run on multiple threads at the same time.
Sourcepub fn allows_thread_blocking(&self) -> bool
pub fn allows_thread_blocking(&self) -> bool
Whether this dispatcher is allowed to call blocking functions or not
pub fn post_task_sync<'a>(&self, p: impl TaskCallback<'a>) -> Result<(), Status>
pub fn spawn_task<'a>( &'a self, future: impl Future<Output = ()> + 'a + Send, ) -> Result<(), Status>
Sourcepub fn release(self) -> DispatcherRef<'static>
pub fn release(self) -> DispatcherRef<'static>
Releases ownership over this dispatcher and returns a DispatcherRef
that can be used to access it. The lifetime of this reference is static because it will
exist so long as this current driver is loaded, but the driver runtime will shut it down
when the driver is unloaded.
Sourcepub fn as_ref(&self) -> DispatcherRef<'_>
pub fn as_ref(&self) -> DispatcherRef<'_>
Returns a DispatcherRef
that references this dispatcher with a lifetime constrained by
self
.
Trait Implementations§
Source§impl Debug for Dispatcher
impl Debug for Dispatcher
Source§impl Drop for Dispatcher
impl Drop for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
Auto Trait Implementations§
impl Freeze for Dispatcher
impl RefUnwindSafe for Dispatcher
impl Unpin for Dispatcher
impl UnwindSafe for Dispatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more