pub struct EmbeddedRuntime;Available on crate features
embedded and std only.Expand description
Runtime impl that spawns one OS thread per future and drives it
with futures::executor::block_on. See module docs for limitations.
Trait Implementations§
Source§impl Clone for EmbeddedRuntime
impl Clone for EmbeddedRuntime
Source§fn clone(&self) -> EmbeddedRuntime
fn clone(&self) -> EmbeddedRuntime
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 EmbeddedRuntime
Source§impl Default for EmbeddedRuntime
impl Default for EmbeddedRuntime
Source§fn default() -> EmbeddedRuntime
fn default() -> EmbeddedRuntime
Returns the “default value” for a type. Read more
Source§impl Runtime for EmbeddedRuntime
impl Runtime for EmbeddedRuntime
Source§fn spawn(&self, fut: BoxFuture<()>) -> SpawnHandle
fn spawn(&self, fut: BoxFuture<()>) -> SpawnHandle
Spawn a future to run on the runtime. The returned
SpawnHandle
can be abort()-ed to request cancellation; dropping the handle
detaches the task without cancelling it.Source§fn now_monotonic(&self) -> Instant
fn now_monotonic(&self) -> Instant
Monotonic instant — strictly non-decreasing across calls on the
same runtime. Used for RTT measurement, retry timers, and any
duration arithmetic that must not be affected by wall-clock skew.
Source§fn now_wall_clock(&self) -> SystemTime
fn now_wall_clock(&self) -> SystemTime
Wall-clock time. May jump forward or backward as the system clock
is adjusted. Used for timestamp-bound material (cookie buckets,
PoW challenge expiry).
Auto Trait Implementations§
impl Freeze for EmbeddedRuntime
impl RefUnwindSafe for EmbeddedRuntime
impl Send for EmbeddedRuntime
impl Sync for EmbeddedRuntime
impl Unpin for EmbeddedRuntime
impl UnsafeUnpin for EmbeddedRuntime
impl UnwindSafe for EmbeddedRuntime
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