Function random

Source
pub fn random<Effect, Event>(
    min: usize,
    max: usize,
) -> RequestBuilder<Effect, Event, impl Future<Output = DelayOutput>>
where Effect: Send + From<Request<DelayOperation>> + 'static, Event: Send + 'static,
Expand description

Request a delay for a random duration between min and max milliseconds.

ยงPanics

  • will panic if min is greater than max.
  • will panic if the shell responds with the incorrect DelayOutput variant.