pub trait RuntimeSubstExt: Sealed + Sized {
// Required methods
fn with_tcp_provider<T>(
&self,
new_tcp: T,
) -> CompoundRuntime<Self, Self, Self, T, Self, Self, Self>;
fn with_sleep_provider<T>(
&self,
new_sleep: T,
) -> CompoundRuntime<Self, T, Self, Self, Self, Self, Self>;
fn with_coarse_time_provider<T>(
&self,
new_coarse_time: T,
) -> CompoundRuntime<Self, Self, T, Self, Self, Self, Self>;
}Expand description
Extension trait on Runtime: Construct new Runtimes that replace part of an original runtime.
(If you need to do more complicated versions of this, you should likely construct CompoundRuntime directly.)
Required Methods§
sourcefn with_tcp_provider<T>(
&self,
new_tcp: T,
) -> CompoundRuntime<Self, Self, Self, T, Self, Self, Self>
fn with_tcp_provider<T>( &self, new_tcp: T, ) -> CompoundRuntime<Self, Self, Self, T, Self, Self, Self>
Return a new runtime wrapping this runtime, but replacing its TCP NetStreamProvider.
sourcefn with_sleep_provider<T>(
&self,
new_sleep: T,
) -> CompoundRuntime<Self, T, Self, Self, Self, Self, Self>
fn with_sleep_provider<T>( &self, new_sleep: T, ) -> CompoundRuntime<Self, T, Self, Self, Self, Self, Self>
Return a new runtime wrapping this runtime, but replacing its SleepProvider.
sourcefn with_coarse_time_provider<T>(
&self,
new_coarse_time: T,
) -> CompoundRuntime<Self, Self, T, Self, Self, Self, Self>
fn with_coarse_time_provider<T>( &self, new_coarse_time: T, ) -> CompoundRuntime<Self, Self, T, Self, Self, Self, Self>
Return a new runtime wrapping this runtime, but replacing its CoarseTimeProvider.
Object Safety§
This trait is not object safe.