pub struct Disconnected {
pub reason: DisconnectReason,
pub will_reconnect: bool,
pub resume: Option<String>,
pub code: Option<i64>,
pub detail: Option<String>,
pub expire_seconds: Option<i64>,
pub retry_after_seconds: Option<i64>,
}Expand description
Data payload of the disconnected event. will_reconnect is always
present: true means the engine reconnects by itself, false means the
session stays offline until you act (see resume).
Decode with serde_json::from_str::<Disconnected>(event.data.get()).
Fields§
§reason: DisconnectReason§will_reconnect: bool§resume: Option<String>Call that brings the session back (connect or resume). Only with
will_reconnect: false.
code: Option<i64>Code WhatsApp reported (logged_out, temporary_ban, connect_failure).
detail: Option<String>Diagnostic text; do not branch on it. "local" marks a logout you asked for.
expire_seconds: Option<i64>temporary_ban: length of the ban, in seconds.
retry_after_seconds: Option<i64>temporary_ban: seconds until the engine reconnects by itself.
Trait Implementations§
Source§impl Clone for Disconnected
impl Clone for Disconnected
Source§impl Debug for Disconnected
impl Debug for Disconnected
Source§impl<'de> Deserialize<'de> for Disconnected
impl<'de> Deserialize<'de> for Disconnected
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Disconnected
impl Freeze for Disconnected
impl Move for Disconnected
impl RefUnwindSafe for Disconnected
impl Send for Disconnected
impl Sync for Disconnected
impl Unpin for Disconnected
impl UnsafeUnpin for Disconnected
impl UnwindSafe for Disconnected
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