pub struct Driver<T> { /* private fields */ }
Implementations§
Source§impl<T: 'static> Driver<T>
impl<T: 'static> Driver<T>
Sourcepub fn new_dispatcher(
&self,
dispatcher: DispatcherBuilder,
) -> Result<DispatcherRef<'static>, Status>
pub fn new_dispatcher( &self, dispatcher: DispatcherBuilder, ) -> Result<DispatcherRef<'static>, Status>
Returns a builder capable of creating a new dispatcher. Note that this dispatcher cannot outlive the driver and is only capable of being stopped by shutting down the driver. It is meant to be created to serve as the initial or default dispatcher for a driver.
pub fn enter<R>(&mut self, f: impl FnOnce() -> R) -> R
pub fn add_allowed_scheduler_role(&self, scheduler_role: &str)
pub fn shutdown<F: DriverShutdownObserverFn<T>>(self, f: F)
Sourcepub fn as_ref_type_erased<'a>(&'a self) -> DriverRefTypeErased<'a>
pub fn as_ref_type_erased<'a>(&'a self) -> DriverRefTypeErased<'a>
Create a reference to a driver without ownership. The returned reference lacks the ability to perform most actions available to the owner of the driver, therefore it doesn’t need to have it’s lifetime tracked closely.
pub fn release(self) -> DriverRef<'static, T>
Trait Implementations§
impl<T: Send> Send for Driver<T>
SAFETY: This inner pointer is movable across threads.
Auto Trait Implementations§
impl<T> Freeze for Driver<T>
impl<T> RefUnwindSafe for Driver<T>where
T: RefUnwindSafe,
impl<T> !Sync for Driver<T>
impl<T> Unpin for Driver<T>
impl<T> UnwindSafe for Driver<T>where
T: RefUnwindSafe,
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