[][src]Module juggle::utils

Couple of helpful utilities.

This module contains stuff useful for:

Structs

AtomicCell

Wrapper struct that allows modifying and swapping value without using locks.

LoadBalance

Helper for equally dividing time slots across multiple tasks. Implements Future.

StdTimerClock

Basic instance of TimerClock implemented using std::time::Instant::now().

TimingGroup

Helper for equally dividing time slots across multiple entries manually.

Traits

DynamicWake

Implement this trait if you want to create custom waker with to_waker function.

TimerClock

Custom time source. Implement this trait if you want to provide your own time source for LoadBalance group.

TimerCount

Trait implemented by data types that can be used to measure time in abstract units.

Functions

func_waker

Returns waker that performs action from specified function pointer when waked.

noop_waker

Returns waker that performs no action when waked.

to_waker

Convert atomic reference counted pointer to type implementing DynamicWake into Waker.