pub enum E2eEvent {
ChatRequested {
chat_id: i32,
from_user_id: i64,
},
ChatReady {
chat_id: i32,
},
ChatDiscarded {
chat_id: i32,
},
Message {
chat_id: i32,
message: Box<DecryptedMessage>,
file: Option<EncryptedFile>,
},
MessageExpired {
chat_id: i32,
random_id: i64,
},
}Expand description
Events emitted by the E2E layer after processing a ferogram update.
Variants§
ChatRequested
An incoming secret chat request arrived (User B side).
ChatReady
Our outgoing request was accepted; chat is now established (User A side).
ChatDiscarded
The remote side closed the secret chat.
Message
An incoming decrypted message (text or media).
file is Some when the message carries an encrypted attachment;
the caller can pass it to E2eClient::download_decrypted_file together
with the key/iv from DecryptedMedia to obtain the plaintext bytes.
MessageExpired
Fired ttl seconds after a self-destructing message was sent or received.
The caller should delete it from local storage and UI.
Trait Implementations§
Auto Trait Implementations§
impl Forget for E2eEvent
impl Freeze for E2eEvent
impl RefUnwindSafe for E2eEvent
impl Send for E2eEvent
impl Sync for E2eEvent
impl Unpin for E2eEvent
impl UnsafeUnpin for E2eEvent
impl UnwindSafe for E2eEvent
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