#![feature(unchecked_math)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Token(pub u8);
pub trait Balance {
type State;
fn new(weights: &[u8]) -> Self;
fn next(&self, state: &Self::State) -> Option<Token>;
fn total(&self) -> u8;
}
pub mod ip_hash;
pub mod round_robin;
mod balancer;
pub use balancer::{Balancer, BalanceCtx, Strategy};