Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Member Functions | List of all members
toolbox::net::RateLimit Class Reference

#include <toolbox/net/RateLimit.hpp>

Public Member Functions

template<typename intervalT = Seconds>
constexpr RateLimit (std::size_t limit, intervalT interval) noexcept
 
 ~RateLimit ()=default
 
constexpr RateLimit (const RateLimit &) noexcept=default
 
constexpr RateLimitoperator= (const RateLimit &) noexcept=default
 
constexpr RateLimit (RateLimit &&) noexcept=default
 
constexpr RateLimitoperator= (RateLimit &&) noexcept=default
 
constexpr auto limit () const noexcept
 
constexpr auto interval () const noexcept
 

Detailed Description

RateLimit represents a rate limit spanning an interval of one or more seconds. Rate limiters control the rate of requests sent or received over the network.

Definition at line 28 of file RateLimit.hpp.

Constructor & Destructor Documentation

◆ RateLimit() [1/3]

template<typename intervalT = Seconds>
constexpr toolbox::net::RateLimit::RateLimit ( std::size_t  limit,
intervalT  interval 
)
inlineconstexprnoexcept

Definition at line 31 of file RateLimit.hpp.

◆ ~RateLimit()

toolbox::net::RateLimit::~RateLimit ( )
default

◆ RateLimit() [2/3]

constexpr toolbox::net::RateLimit::RateLimit ( const RateLimit )
constexprdefaultnoexcept

◆ RateLimit() [3/3]

constexpr toolbox::net::RateLimit::RateLimit ( RateLimit &&  )
constexprdefaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

constexpr RateLimit & toolbox::net::RateLimit::operator= ( const RateLimit )
constexprdefaultnoexcept

◆ operator=() [2/2]

constexpr RateLimit & toolbox::net::RateLimit::operator= ( RateLimit &&  )
constexprdefaultnoexcept

◆ limit()

constexpr auto toolbox::net::RateLimit::limit ( ) const
inlineconstexprnoexcept

Definition at line 47 of file RateLimit.hpp.

◆ interval()

constexpr auto toolbox::net::RateLimit::interval ( ) const
inlineconstexprnoexcept

Definition at line 48 of file RateLimit.hpp.


The documentation for this class was generated from the following file: