Enum tauri::async_runtime::Runtime
source · pub enum Runtime {
Tokio(TokioRuntime),
}
Expand description
A runtime used to execute asynchronous tasks.
Variants§
Tokio(TokioRuntime)
The tokio runtime.
Implementations§
source§impl Runtime
impl Runtime
sourcepub fn inner(&self) -> &TokioRuntime
pub fn inner(&self) -> &TokioRuntime
Gets a reference to the TokioRuntime
.
sourcepub fn handle(&self) -> RuntimeHandle
pub fn handle(&self) -> RuntimeHandle
Returns a handle of the async runtime.
sourcepub fn spawn<F>(&self, task: F) -> JoinHandle<F::Output> ⓘ
pub fn spawn<F>(&self, task: F) -> JoinHandle<F::Output> ⓘ
Spawns a future onto the runtime.
sourcepub fn spawn_blocking<F, R>(&self, func: F) -> JoinHandle<R> ⓘ
pub fn spawn_blocking<F, R>(&self, func: F) -> JoinHandle<R> ⓘ
Runs the provided function on an executor dedicated to blocking operations.
Auto Trait Implementations§
impl !Freeze for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
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