pub enum StreamState {
Connecting,
Connected,
Reconnecting(u32),
Disconnected,
}Expand description
Connection-lifecycle states reported by EventStream via
StreamOptions::on_state.
Variants§
Connecting
About to open (or reopen) the HTTP connection. Fired once, before the first attempt.
Connected
The server answered 2xx and the stream is being read.
Reconnecting(u32)
Waiting on backoff before a reconnect attempt. attempt is 1-based.
Disconnected
The stream ended without the caller dropping it (terminal frame,
[DONE], or the reconnect budget exhausted). NOT fired on caller drop.
Trait Implementations§
Source§impl Clone for StreamState
impl Clone for StreamState
impl Copy for StreamState
Source§impl Debug for StreamState
impl Debug for StreamState
impl Eq for StreamState
Source§impl PartialEq for StreamState
impl PartialEq for StreamState
impl StructuralPartialEq for StreamState
Auto Trait Implementations§
impl Freeze for StreamState
impl RefUnwindSafe for StreamState
impl Send for StreamState
impl Sync for StreamState
impl Unpin for StreamState
impl UnsafeUnpin for StreamState
impl UnwindSafe for StreamState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.