pub struct ReconnectState {
pub attempts: u32,
pub last_reconnect: Option<Instant>,
}Expand description
重连状态追踪
用于记录当前重连次数和上次重连时间,供外部监控使用。
Fields§
§attempts: u32当前重连次数
last_reconnect: Option<Instant>上次重连时间
Trait Implementations§
Source§impl Clone for ReconnectState
impl Clone for ReconnectState
Source§fn clone(&self) -> ReconnectState
fn clone(&self) -> ReconnectState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ReconnectState
impl Debug for ReconnectState
Source§impl Default for ReconnectState
impl Default for ReconnectState
Source§fn default() -> ReconnectState
fn default() -> ReconnectState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReconnectState
impl RefUnwindSafe for ReconnectState
impl Send for ReconnectState
impl Sync for ReconnectState
impl Unpin for ReconnectState
impl UnsafeUnpin for ReconnectState
impl UnwindSafe for ReconnectState
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