pub struct TokioRuntime;Expand description
Tokio-backed Runtime. Zero-sized — construct with TokioRuntime
and wrap in Arc to share across tasks.
Trait Implementations§
Source§impl Clone for TokioRuntime
impl Clone for TokioRuntime
Source§fn clone(&self) -> TokioRuntime
fn clone(&self) -> TokioRuntime
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 TokioRuntime
Source§impl Default for TokioRuntime
impl Default for TokioRuntime
Source§fn default() -> TokioRuntime
fn default() -> TokioRuntime
Returns the “default value” for a type. Read more
Source§impl Runtime for TokioRuntime
impl Runtime for TokioRuntime
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 TokioRuntime
impl RefUnwindSafe for TokioRuntime
impl Send for TokioRuntime
impl Sync for TokioRuntime
impl Unpin for TokioRuntime
impl UnsafeUnpin for TokioRuntime
impl UnwindSafe for TokioRuntime
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