pub enum Frame {
Init {
bundle: PreKeyBundle,
account: Option<String>,
},
Accept {
response: HandshakeResponse,
account: Option<String>,
},
Reject {
reason: Option<String>,
},
Ack {
ct: RatchetMessage,
},
Close,
Msg {
ct: RatchetMessage,
},
Media {
ct: RatchetMessage,
},
}Expand description
One t/v protocol frame, exactly as the wire’s client-only tag carries it (init,
accept, reject, ack, close) or, for msg and media, the ?obe2ee:-prefixed body.
frag is not a variant here: it wraps another frame’s encoded bytes across several wire
lines and belongs to the transport that reassembles it, not to session logic. See Frag.
Variants§
Init
An offer to start an encrypted session.
Fields
bundle: PreKeyBundleThe offering side’s prekey bundle.
Accept
An answer to an offer.
Fields
response: HandshakeResponseThe answering side’s handshake response.
Reject
A refusal of an offer.
Ack
The initiator’s first encrypted payload, proving the session works.
Fields
ct: RatchetMessageThe ratchet-encrypted empty payload.
Close
The end of a session.
Msg
An encrypted text message.
Fields
ct: RatchetMessageThe ratchet-encrypted payload.
Media
An encrypted file descriptor.
Fields
ct: RatchetMessageThe ratchet-encrypted payload, whose plaintext is a media descriptor.