pub struct ChatConnection { /* private fields */ }Expand description
私聊长连接:收发消息、注册监听、断开重连。
Implementations§
Source§impl ChatConnection
impl ChatConnection
Sourcepub async fn off(&self, kind: ChatEventKind)
pub async fn off(&self, kind: ChatEventKind)
移除某类监听。
Sourcepub fn set_retry_policy(&mut self, policy: RetryPolicy)
pub fn set_retry_policy(&mut self, policy: RetryPolicy)
设置重连策略。
Sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
断开连接。
Auto Trait Implementations§
impl !RefUnwindSafe for ChatConnection
impl !UnwindSafe for ChatConnection
impl Forget for ChatConnection
impl Freeze for ChatConnection
impl Move for ChatConnection
impl Send for ChatConnection
impl Sync for ChatConnection
impl Unpin for ChatConnection
impl UnsafeUnpin for ChatConnection
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