Function hrpc::server::filters::rate::rate_limit[][src]

pub fn rate_limit<Err: CustomError + 'static>(
    rate: Rate,
    error: fn(_: Duration) -> Err
) -> impl Filter<Extract = (), Error = Rejection> + Sync + Send + Clone
Expand description

Creates a filter that will return an Err(error) with error generated with the provided error function if rate limited.