pub enum DisconnectReason {
Transient,
Manual,
Paused,
LoggedOut,
Replaced,
TemporaryBan,
ClientOutdated,
ConnectFailure,
Unknown(String),
}Expand description
Why a session went offline. The set is closed, but a newer server may add a
value: it decodes as DisconnectReason::Unknown instead of failing, so
decide by Disconnected::will_reconnect when is_known
is false.
Variants§
Transient
Network or WhatsApp drop the engine retries by itself.
Manual
A disconnect you asked for.
Paused
A durable pause you asked for; resume it explicitly.
LoggedOut
The link was removed; pair again.
Replaced
Another client took over the session.
TemporaryBan
Temporary ban; the engine reconnects after retry_after_seconds.
ClientOutdated
WhatsApp refused the engine’s client version.
ConnectFailure
A connect error WhatsApp reported (see code).
Unknown(String)
A value this SDK version does not know.
Implementations§
Trait Implementations§
Source§impl Clone for DisconnectReason
impl Clone for DisconnectReason
Source§impl Debug for DisconnectReason
impl Debug for DisconnectReason
Source§impl<'de> Deserialize<'de> for DisconnectReason
impl<'de> Deserialize<'de> for DisconnectReason
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DisconnectReason
Source§impl PartialEq for DisconnectReason
impl PartialEq for DisconnectReason
impl StructuralPartialEq for DisconnectReason
Auto Trait Implementations§
impl Forget for DisconnectReason
impl Freeze for DisconnectReason
impl Move for DisconnectReason
impl RefUnwindSafe for DisconnectReason
impl Send for DisconnectReason
impl Sync for DisconnectReason
impl Unpin for DisconnectReason
impl UnsafeUnpin for DisconnectReason
impl UnwindSafe for DisconnectReason
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