pub struct ReconnectingClient { /* private fields */ }Expand description
带自动重连的客户端包装
Implementations§
Source§impl ReconnectingClient
impl ReconnectingClient
pub fn new(config: ClientConfig) -> Self
pub fn with_policy(self, policy: ReconnectPolicy) -> Self
Sourcepub async fn connect(
&mut self,
) -> Result<(FutuClient, UnboundedReceiver<PushMessage>, InitConnectInfo)>
pub async fn connect( &mut self, ) -> Result<(FutuClient, UnboundedReceiver<PushMessage>, InitConnectInfo)>
带重连的连接循环
返回成功连接的 (FutuClient, push_rx, InitConnectInfo)。 如果达到最大重试次数则返回错误。
Auto Trait Implementations§
impl Freeze for ReconnectingClient
impl RefUnwindSafe for ReconnectingClient
impl Send for ReconnectingClient
impl Sync for ReconnectingClient
impl Unpin for ReconnectingClient
impl UnwindSafe for ReconnectingClient
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