pub enum Event {
Connected {
reconnected: bool,
},
Disconnected {
will_reconnect: bool,
},
Rejected,
}Expand description
What happened to a subscription’s connection. Some channels only send what’s new, so a reconnect can leave a gap, and only the client knows a reconnect happened.
Variants§
Connected
The server confirmed the subscription. reconnected is false the first time and true
every time after, which is when a channel that only streams what’s new has a gap to
fill.
Disconnected
The connection dropped. will_reconnect says whether the client is coming back or
has stopped for good.
Rejected
The channel rejected the subscription. On the first subscribe that is also the
Error::Rejected the call returns, so a handle only ever reads this after a
reconnect. Nothing more arrives; the client has already let go of it.
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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