Skip to main content

Module types

Module types 

Source

Structs§

Disconnected
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()).
Event
IncomingMessage
MarkReadParams
MessageResponse
PairPhoneResult
PairingFailed
Data payload of the pairing.failed event: how a pairing attempt ended without linking the number. at is the end of the attempt, ISO 8601. Decode with serde_json::from_str::<PairingFailed>(event.data.get()).
PairingSucceeded
Data payload of the pairing.succeeded event, sent just before connected. Decode with serde_json::from_str::<PairingSucceeded>(event.data.get()).
PresenceParams
QRCode
Receipt
Data payload of the receipt event. One receipt can acknowledge several messages (message_ids); in groups there is one receipt per participant. Decode with serde_json::from_str::<Receipt>(event.data.get()).
SendAudioParams
SendContactParams
SendDocumentParams
SendImageParams
SendLocationParams
SendPollParams
SendReactionParams
SendStickerParams
SendTextParams
SendVideoParams
SessionStatus

Enums§

DisconnectReason
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.
PairingFailureReason
Why a pairing attempt ended without linking the number. The set is closed, but a newer server may add a value: it decodes as PairingFailureReason::Unknown instead of failing, so treat it like PairingFailureReason::Error when is_known is false.
PairingMethod
How a pairing attempt links the device. A value a newer server adds decodes as PairingMethod::Unknown instead of failing.
ReceiptStatus
Normalized delivery state of a Receipt.