Struct Rate

pub struct Rate { /* private fields */ }

A rate of requests per time period.

Implementations

impl Rate

const fn new(num: u64, per: Duration) -> Self

Create a new rate.

Panics

This function panics if num or per is 0.

Trait Implementations

impl Clone for Rate

fn clone(&self) -> Self

impl Copy for Rate

impl Debug for Rate

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl Freeze for Rate

impl RefUnwindSafe for Rate

impl Send for Rate

impl Sync for Rate

impl Unpin for Rate

impl UnsafeUnpin for Rate

impl UnwindSafe for Rate

Blanket Implementations

impl<T> Any for Rate where T: 'static + ?Sized,

impl<T> Borrow<T> for Rate where T: ?Sized,

impl<T> BorrowMut<T> for Rate where T: ?Sized,

impl<T> CloneToUninit for Rate where T: Clone,

impl<T> From<T> for Rate

impl<T> Instrument for Rate

impl<T> ToOwned for Rate where T: Clone,

impl<T> WithSubscriber for Rate

impl<T, U> Into<U> for Rate where U: From<T>,

impl<T, U> TryFrom<U> for Rate where U: Into<T>,

impl<T, U> TryInto<U> for Rate where U: TryFrom<T>,