pub enum ConnectionState {
Initializing,
Disconnected {
reason: String,
},
Connecting {
reason: Option<String>,
},
Connected,
NeedsAuth(NeedsAuthReason),
Error {
reason: String,
},
Closed {
reason: String,
},
}Expand description
The connection state an app sees (ConnectionState in
packages/zero-client/src/client/connection.ts).
Variants§
Initializing
The client has not tried to connect yet.
Disconnected
Offline: the client keeps trying to connect, less often.
Connecting
Trying to connect.
Connected
Syncing.
NeedsAuth(NeedsAuthReason)
The server or the API server rejected the credentials: call
Connection::connect with new ones.
Error
The client stopped: the server rejected it or a change failed.
Connection::connect tries again.
Closed
Zero::close was called.
Implementations§
Trait Implementations§
Source§impl Clone for ConnectionState
impl Clone for ConnectionState
Source§impl Debug for ConnectionState
impl Debug for ConnectionState
Source§impl PartialEq for ConnectionState
impl PartialEq for ConnectionState
impl StructuralPartialEq for ConnectionState
Auto Trait Implementations§
impl Forget for ConnectionState
impl Freeze for ConnectionState
impl Move for ConnectionState
impl RefUnwindSafe for ConnectionState
impl Send for ConnectionState
impl Sync for ConnectionState
impl Unpin for ConnectionState
impl UnsafeUnpin for ConnectionState
impl UnwindSafe for ConnectionState
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