async-priority-limiter 0.4.4

Throttles prioritised tasks by limiting the max concurrent tasks and minimum time between tasks, with up to two levels based on keys
Documentation
1
2
3
4
5
6
7
8
9
10
use std::hash::Hash;

pub trait TaskResult: Send + 'static {}
impl<T: Send + 'static> TaskResult for T {}

pub trait Priority: Ord + Send + Clone + 'static {}
impl<P: Ord + Send + Clone + 'static> Priority for P {}

pub trait Key: Clone + Hash + PartialEq + Eq + Send + Sync + 'static {}
impl<K: Clone + Hash + PartialEq + Eq + Send + Sync + 'static> Key for K {}