pub enum SessionState {
Idle,
Handshaking,
Connected,
ControlTypeSelected(ControlType),
Closed(CloseReason),
}Expand description
Where a session has got to.
Connected and ControlTypeSelected are the standard’s own two states,
WebSocketConnected and ControlTypeActivated. The rest are this crate’s: a session
that has not started, one that is mid-handshake, and one that is over.
Variants§
Idle
Nothing has been sent yet.
Handshaking
The handshake is in progress.
Connected
WebSocketConnected: details, measurements and forecasts flow.
ControlTypeSelected(ControlType)
ControlTypeActivated. Note that NOT_CONTROLABLE is a legal selection and
lands here too, with nothing control-type specific allowed after it.
Closed(CloseReason)
Over, and why.
Implementations§
Source§impl SessionState
impl SessionState
Sourcepub fn active_control_type(&self) -> Option<ControlType>
pub fn active_control_type(&self) -> Option<ControlType>
The control type that is active, if it is one that can be instructed.
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionState
impl Debug for SessionState
impl Eq for SessionState
Source§impl PartialEq for SessionState
impl PartialEq for SessionState
impl StructuralPartialEq for SessionState
Auto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.