pub struct EmbassyRuntime;Available on crate feature
embassy only.Expand description
Concrete RuntimeLite implementation based on
embassy-executor.
Before any task is spawned through this runtime, the global spawner must be installed once with
init from within a running embassy executor. See the module documentation for the
caveats of this backend (block_on busy-polls, spawn_blocking and local spawning panic,
and the number of live spawned tasks is bounded by TASK_POOL_SIZE).
Trait Implementations§
Source§impl Clone for EmbassyRuntime
impl Clone for EmbassyRuntime
Source§fn clone(&self) -> EmbassyRuntime
fn clone(&self) -> EmbassyRuntime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EmbassyRuntime
Source§impl Debug for EmbassyRuntime
impl Debug for EmbassyRuntime
Source§impl Display for EmbassyRuntime
impl Display for EmbassyRuntime
Source§impl LocalRuntimeLite for EmbassyRuntime
impl LocalRuntimeLite for EmbassyRuntime
Source§type LocalSpawner = EmbassySpawner
type LocalSpawner = EmbassySpawner
The local spawner type for this runtime Read more
Source§type BlockingSpawner = EmbassySpawner
type BlockingSpawner = EmbassySpawner
The blocking spawner type for this runtime
Source§type LocalInterval = EmbassyInterval
type LocalInterval = EmbassyInterval
Available on crate feature
time only.The local interval type for this runtime
Source§type LocalSleep = EmbassySleep
type LocalSleep = EmbassySleep
Available on crate feature
time only.The local sleep type for this runtime
Source§type LocalDelay<F> = Delay<F, EmbassySleep>
where
F: Future
type LocalDelay<F> = Delay<F, EmbassySleep> where F: Future
Available on crate feature
time only.The local delay type for this runtime
Source§type LocalTimeout<F> = EmbassyTimeout<F>
where
F: Future
type LocalTimeout<F> = EmbassyTimeout<F> where F: Future
Available on crate feature
time only.The local timeout type for this runtime
Source§fn interval_local(interval: Duration) -> Self::LocalInterval
fn interval_local(interval: Duration) -> Self::LocalInterval
Available on crate feature
time only.Create a new interval that starts at the current time and
yields every
period durationSource§fn interval_local_at(start: Instant, period: Duration) -> Self::LocalInterval
fn interval_local_at(start: Instant, period: Duration) -> Self::LocalInterval
Available on crate feature
time only.Create a new interval that starts at the given instant and
yields every
period durationSource§fn sleep_local(duration: Duration) -> Self::LocalSleep
fn sleep_local(duration: Duration) -> Self::LocalSleep
Available on crate feature
time only.Create a new sleep future that completes after the given duration
has elapsed
Source§fn sleep_local_until(instant: Instant) -> Self::LocalSleep
fn sleep_local_until(instant: Instant) -> Self::LocalSleep
Available on crate feature
time only.Create a new sleep future that completes at the given instant
has elapsed
Source§fn delay_local<F>(duration: Duration, fut: F) -> Self::LocalDelay<F>where
F: Future,
fn delay_local<F>(duration: Duration, fut: F) -> Self::LocalDelay<F>where
F: Future,
Available on crate feature
time only.Source§fn delay_local_at<F>(deadline: Instant, fut: F) -> Self::LocalDelay<F>where
F: Future,
fn delay_local_at<F>(deadline: Instant, fut: F) -> Self::LocalDelay<F>where
F: Future,
Available on crate feature
time only.Source§fn timeout_local<F>(duration: Duration, future: F) -> Self::LocalTimeout<F>where
F: Future,
fn timeout_local<F>(duration: Duration, future: F) -> Self::LocalTimeout<F>where
F: Future,
Available on crate feature
time only.Source§fn timeout_local_at<F>(deadline: Instant, future: F) -> Self::LocalTimeout<F>where
F: Future,
fn timeout_local_at<F>(deadline: Instant, future: F) -> Self::LocalTimeout<F>where
F: Future,
Available on crate feature
time only.Like
timeout_at, but does not requrie the future to be Send.
Requires a Future to complete before the specified duration has elapsed. Read moreSource§fn spawn_local<F>(
future: F,
) -> <Self::LocalSpawner as AsyncLocalSpawner>::JoinHandle<F::Output>
fn spawn_local<F>( future: F, ) -> <Self::LocalSpawner as AsyncLocalSpawner>::JoinHandle<F::Output>
Spawn a future onto the local runtime
Source§fn spawn_local_detach<F>(future: F)
fn spawn_local_detach<F>(future: F)
Spawn a future onto the local runtime and detach it
Source§fn spawn_blocking<F, R>(
f: F,
) -> <Self::BlockingSpawner as AsyncBlockingSpawner>::JoinHandle<R>
fn spawn_blocking<F, R>( f: F, ) -> <Self::BlockingSpawner as AsyncBlockingSpawner>::JoinHandle<R>
Spawn a blocking function onto the runtime
Source§fn spawn_blocking_detach<F, R>(f: F)
fn spawn_blocking_detach<F, R>(f: F)
Spawn a blocking function onto the runtime and detach it
Source§impl RuntimeLite for EmbassyRuntime
impl RuntimeLite for EmbassyRuntime
Source§type Spawner = EmbassySpawner
type Spawner = EmbassySpawner
The spawner type for this runtime
Source§type AfterSpawner = EmbassySpawner
type AfterSpawner = EmbassySpawner
Available on crate feature
time only.The after spawner type for this runtime
Source§type Interval = EmbassyInterval
type Interval = EmbassyInterval
Available on crate feature
time only.The interval type for this runtime
Source§type Sleep = EmbassySleep
type Sleep = EmbassySleep
Available on crate feature
time only.The sleep type for this runtime
Source§type Delay<F> = Delay<F, EmbassySleep>
where
F: Future + Send
type Delay<F> = Delay<F, EmbassySleep> where F: Future + Send
Available on crate feature
time only.The delay type for this runtime
Source§type Timeout<F> = EmbassyTimeout<F>
where
F: Future + Send
type Timeout<F> = EmbassyTimeout<F> where F: Future + Send
Available on crate feature
time only.The timeout type for this runtime
Source§fn interval(interval: Duration) -> Self::Interval
fn interval(interval: Duration) -> Self::Interval
Available on crate feature
time only.Create a new interval that starts at the current time and
yields every
period durationSource§fn interval_at(start: Instant, period: Duration) -> Self::Interval
fn interval_at(start: Instant, period: Duration) -> Self::Interval
Available on crate feature
time only.Create a new interval that starts at the given instant and
yields every
period durationSource§fn sleep(duration: Duration) -> Self::Sleep
fn sleep(duration: Duration) -> Self::Sleep
Available on crate feature
time only.Create a new sleep future that completes after the given duration
has elapsed
Source§fn sleep_until(instant: Instant) -> Self::Sleep
fn sleep_until(instant: Instant) -> Self::Sleep
Available on crate feature
time only.Create a new sleep future that completes at the given instant
has elapsed
Source§fn delay<F>(duration: Duration, fut: F) -> Self::Delay<F>
fn delay<F>(duration: Duration, fut: F) -> Self::Delay<F>
Available on crate feature
time only.Create a new delay future that runs the
fut after the given duration
has elapsed. The Future will never be polled until the duration has
elapsed. Read moreSource§fn delay_at<F>(deadline: Instant, fut: F) -> Self::Delay<F>
fn delay_at<F>(deadline: Instant, fut: F) -> Self::Delay<F>
Available on crate feature
time only.Create a new timeout future that runs the
future after the given deadline.
The Future will never be polled until the deadline has reached. Read moreSource§fn timeout<F>(duration: Duration, future: F) -> Self::Timeout<F>
fn timeout<F>(duration: Duration, future: F) -> Self::Timeout<F>
Available on crate feature
time only.Requires a
Future to complete before the specified duration has elapsed. Read moreSource§fn timeout_at<F>(deadline: Instant, future: F) -> Self::Timeout<F>
fn timeout_at<F>(deadline: Instant, future: F) -> Self::Timeout<F>
Available on crate feature
time only.Requires a
Future to complete before the specified instant in time. Read moreSource§fn spawn<F>(future: F) -> <Self::Spawner as AsyncSpawner>::JoinHandle<F::Output>
fn spawn<F>(future: F) -> <Self::Spawner as AsyncSpawner>::JoinHandle<F::Output>
Spawn a future onto the runtime
Source§fn spawn_detach<F>(future: F)
fn spawn_detach<F>(future: F)
Spawn a future onto the runtime and detach it
Source§fn spawn_after<F>(
duration: Duration,
future: F,
) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
fn spawn_after<F>( duration: Duration, future: F, ) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
Available on crate feature
time only.Spawn a future onto the runtime and run the given future after the given duration
Source§fn spawn_after_at<F>(
at: Self::Instant,
future: F,
) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
fn spawn_after_at<F>( at: Self::Instant, future: F, ) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
Available on crate feature
time only.Spawn a future onto the runtime and run the given future after the given instant.
Auto Trait Implementations§
impl Freeze for EmbassyRuntime
impl RefUnwindSafe for EmbassyRuntime
impl Send for EmbassyRuntime
impl Sync for EmbassyRuntime
impl Unpin for EmbassyRuntime
impl UnsafeUnpin for EmbassyRuntime
impl UnwindSafe for EmbassyRuntime
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