pub struct ReconnectFn(pub Box<fn(usize) -> Duration>);Expand description
Takes a Box<dyn Fn(usize) -> Duration>
The provided function should take a count of reconnect attempts and return a Duration to wait
until the next attempt is made.
Tuple Fields§
§0: Box<fn(usize) -> Duration>Implementations§
Trait Implementations§
Source§impl Clone for ReconnectFn
impl Clone for ReconnectFn
Source§fn clone(&self) -> ReconnectFn
fn clone(&self) -> ReconnectFn
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReconnectFn
impl Debug for ReconnectFn
Auto Trait Implementations§
impl Freeze for ReconnectFn
impl RefUnwindSafe for ReconnectFn
impl Send for ReconnectFn
impl Sync for ReconnectFn
impl Unpin for ReconnectFn
impl UnwindSafe for ReconnectFn
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