Struct Driver

Source
pub struct Driver<T> { /* private fields */ }

Implementations§

Source§

impl<T: 'static> Driver<T>

Source

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.

Source

pub fn enter<R>(&mut self, f: impl FnOnce() -> R) -> R

Source

pub fn add_allowed_scheduler_role(&self, scheduler_role: &str)

Source

pub fn shutdown<F: DriverShutdownObserverFn<T>>(self, f: F)

Source

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.

Source

pub fn release(self) -> DriverRef<'static, T>

Trait Implementations§

Source§

impl<T: Debug> Debug for Driver<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Drop for Driver<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.