pub struct ReconnectRateLimiter { /* private fields */ }Expand description
Rate limiter for reconnection attempts.
Implementations§
Source§impl ReconnectRateLimiter
impl ReconnectRateLimiter
Sourcepub async fn get_turn(&self, url: &str) -> Duration
pub async fn get_turn(&self, url: &str) -> Duration
Get a “turn” to attempt a connection.
This may wait if too many rapid attempts have been made.
Sourcepub async fn is_connected(&self, url: &str) -> bool
pub async fn is_connected(&self, url: &str) -> bool
Check if a URL is currently connected.
Sourcepub async fn failure_count(&self, url: &str) -> u32
pub async fn failure_count(&self, url: &str) -> u32
Get the current failure count for a URL.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReconnectRateLimiter
impl !RefUnwindSafe for ReconnectRateLimiter
impl Send for ReconnectRateLimiter
impl Sync for ReconnectRateLimiter
impl Unpin for ReconnectRateLimiter
impl !UnwindSafe for ReconnectRateLimiter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more