pub struct Shell {
pub spawn: Arc<dyn Spawn>,
pub clock: Arc<dyn Clock>,
pub sleep: Arc<dyn Sleep>,
}Expand description
The three shell services a runtime node uses.
Fields§
§spawn: Arc<dyn Spawn>Background work: function actors, stream actors and stateless workers.
clock: Arc<dyn Clock>The time source.
sleep: Arc<dyn Sleep>Waiting for timers, idle timeouts and ask timeouts.
Implementations§
Source§impl Shell
impl Shell
Sourcepub fn tokio() -> Self
pub fn tokio() -> Self
The tokio shell: tokio::spawn, the system clock and tokio::time::sleep. Spawning
needs a running tokio runtime.
Sourcepub fn virtual_time(start_ms: i64) -> (Self, VirtualClock)
pub fn virtual_time(start_ms: i64) -> (Self, VirtualClock)
A deterministic shell for tests: tokio spawning and a VirtualClock starting at
start_ms that moves only when advanced.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Shell
impl !UnwindSafe for Shell
impl Forget for Shell
impl Freeze for Shell
impl Move for Shell
impl Send for Shell
impl Sync for Shell
impl Unpin for Shell
impl UnsafeUnpin for Shell
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