pub enum SessionState {
Uninitialized,
Initialized(Rc<ConnectionInfo>),
Connecting(Rc<ConnectionInfo>),
Authorizing(Rc<ConnectionInfo>),
Lost(ConnectionLostReason, Rc<ConnectionInfo>),
Opened(Rc<ConnectionInfo>),
Finished(CloseReason),
}
Expand description
State for the WebSocketRpcSession
.
§State transition scheme
+---------------+
+--->+ Uninitialized |
| +-------+-------+
| |
| v
| +-------+-------+
| | Initialized |
| +-------+-------+
| |
| v +------------+
| +-------+-------+<-----------+ |
| | Connecting | | Failed |
| +-------+-------+----------->+ |
| | +------+-----+
| v ^
| +-------+-------+ |
+----+ Authorizing +------------------>+
+-------+-------+ |
| |
v |
+-------+-------+ |
| Opened +------------------>+
+-------+-------+
|
v
+-------+-------+
| Finished |
+---------------+
Variants§
Uninitialized
WebSocketRpcSession
currently doesn’t have ConnectionInfo
to
authorize with.
Initialized(Rc<ConnectionInfo>)
ConnectionInfo
was specified, but no transport connection
establishment attempts were made yet.
Connecting(Rc<ConnectionInfo>)
Ongoing transport connection establishment.
Authorizing(Rc<ConnectionInfo>)
Transport connection is establish and WebSocketRpcSession
is
currently performing session authorization.
Lost(ConnectionLostReason, Rc<ConnectionInfo>)
Connection with a server was lost but can be recovered.
Opened(Rc<ConnectionInfo>)
Connection with a server is established and WebSocketRpcSession
is
authorized.
Finished(CloseReason)
Terminal state: transport is closed and can not be reopened.
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 · 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
Source§impl PartialEq for SessionState
impl PartialEq 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 !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