pub struct ArticleConnection { /* private fields */ }Expand description
文章频道长连接:监听原始推送、断开重连。
Implementations§
Source§impl ArticleConnection
impl ArticleConnection
Sourcepub async fn on_message<F>(&self, listener: F)
pub async fn on_message<F>(&self, listener: F)
监听文章频道推送(原始 JSON)。
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 ArticleConnection
impl !UnwindSafe for ArticleConnection
impl Forget for ArticleConnection
impl Freeze for ArticleConnection
impl Move for ArticleConnection
impl Send for ArticleConnection
impl Sync for ArticleConnection
impl Unpin for ArticleConnection
impl UnsafeUnpin for ArticleConnection
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