pub struct Runtime { /* private fields */ }
Expand description
Runtime from the futures-executor
crate
Trait Implementations§
Source§impl CompatInterface for Runtime
impl CompatInterface for Runtime
Source§fn tokio_compat<T>(
f: impl Future<Output = T> + Send,
) -> impl Future<Output = T> + Send
fn tokio_compat<T>( f: impl Future<Output = T> + Send, ) -> impl Future<Output = T> + Send
Drive a future in a compatibility layer.
Source§fn spawn_tokio_task<F, T>(
&self,
future: F,
) -> Result<TaskHandle<Self::TaskHandle<<F as Future>::Output>>, Self::SpawnError>
fn spawn_tokio_task<F, T>( &self, future: F, ) -> Result<TaskHandle<Self::TaskHandle<<F as Future>::Output>>, Self::SpawnError>
Spawn a task using tokio compatibility layer.
Source§impl CreationInterface for Runtime
impl CreationInterface for Runtime
Source§impl From<ThreadPool> for Runtime
impl From<ThreadPool> for Runtime
Source§fn from(thread_pool: ThreadPool) -> Runtime
fn from(thread_pool: ThreadPool) -> Runtime
Converts to this type from the input type.
Source§impl TaskInterface for Runtime
impl TaskInterface for Runtime
Source§type TaskHandle<T: 'static> = RemoteHandle<Result<T, <Runtime as TaskInterface>::JoinError>>
type TaskHandle<T: 'static> = RemoteHandle<Result<T, <Runtime as TaskInterface>::JoinError>>
Result of spawning a task
Source§type SpawnError = SpawnError
type SpawnError = SpawnError
Error type for errors occuring during spawning
Source§type JoinError = Infallible
type JoinError = Infallible
Error type when creating
Source§fn spawn_task<F, T>(
&self,
future: F,
) -> Result<TaskHandle<<Runtime as TaskInterface>::TaskHandle<<F as Future>::Output>>, <Runtime as TaskInterface>::SpawnError>
fn spawn_task<F, T>( &self, future: F, ) -> Result<TaskHandle<<Runtime as TaskInterface>::TaskHandle<<F as Future>::Output>>, <Runtime as TaskInterface>::SpawnError>
Spawn a task
Source§impl TimeInterface for Runtime
impl TimeInterface for Runtime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more