pub struct ConnectionStateManager { /* private fields */ }Expand description
连接状态管理器
Implementations§
Source§impl ConnectionStateManager
impl ConnectionStateManager
pub fn new() -> Self
pub fn set_state(&self, new_state: ConnectionState)
pub fn get_state(&self) -> ConnectionState
pub fn start_connecting(&self)
pub fn set_connected(&self)
pub fn set_disconnected(&self)
pub fn set_failed(&self)
pub fn set_reconnecting(&self)
pub fn state_changed_at(&self) -> MonotonicInstant
pub fn connect_duration(&self) -> Option<Duration>
Trait Implementations§
Source§impl Clone for ConnectionStateManager
impl Clone for ConnectionStateManager
Auto Trait Implementations§
impl Freeze for ConnectionStateManager
impl RefUnwindSafe for ConnectionStateManager
impl Send for ConnectionStateManager
impl Sync for ConnectionStateManager
impl Unpin for ConnectionStateManager
impl UnsafeUnpin for ConnectionStateManager
impl UnwindSafe for ConnectionStateManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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