Skip to main content

AppEvent

Enum AppEvent 

Source
pub enum AppEvent {
Show 26 variants RoomDiscovered(DiscoveredRoom), RoomLost { room_id: String, }, RoomJoined { room_id: String, }, RoomLeft { room_id: String, }, MemberJoined { room_id: String, fingerprint: String, }, MemberLeft { room_id: String, fingerprint: String, }, MessageReceived { room_id: String, sender_fingerprint: String, body: String, sent_at: i64, }, MessageSent { room_id: String, body: String, message_id: i64, }, ListeningOn { address: String, }, PeerDiscovered { peer_id: PeerId, }, PeerExpired { peer_id: PeerId, }, Dialing { address: String, }, DialSucceeded { address: String, peer_id: PeerId, }, DialFailed { address: String, error: String, }, Error { description: String, }, FileOffered { room_id: String, file_id: String, name: String, size_bytes: u64, sender_fingerprint: String, }, FileProgress { file_id: String, bytes_received: u64, total_bytes: u64, }, FileReady { file_id: String, }, FileSaved { file_id: String, path: String, }, FileFailed { file_id: String, reason: String, }, RotationRequested { room_id: String, rotator_fingerprint: String, new_salt: Vec<u8>, }, TypingChanged { room_id: String, }, MentionReceived { room_id: String, body: String, }, InboundDial { peer_id: PeerId, fingerprint: String, address: String, }, SasCodeReady { room_id: String, partner_fingerprint: String, tx_id: String, emoji_string: String, emoji_labels: String, decimal: String, }, SasVerified { room_id: String, partner_fingerprint: String, },
}

Variants§

§

RoomDiscovered(DiscoveredRoom)

A room was discovered (announced on the global topic).

§

RoomLost

A previously-discovered room hasn’t been re-announced — TTL expired.

Fields

§room_id: String
§

RoomJoined

We successfully joined a room (subscribed to its topic).

Fields

§room_id: String
§

RoomLeft

We left a room.

Fields

§room_id: String
§

MemberJoined

A new member appeared in a room we’re in.

Fields

§room_id: String
§fingerprint: String
§

MemberLeft

A member left a room we’re in.

Fields

§room_id: String
§fingerprint: String
§

MessageReceived

A message arrived in a room.

Fields

§room_id: String
§sender_fingerprint: String
§body: String
§sent_at: i64
§

MessageSent

Our own message was sent successfully.

Fields

§room_id: String
§body: String
§message_id: i64
§

ListeningOn

Listening on a network address.

Fields

§address: String
§

PeerDiscovered

A peer was discovered on the LAN.

Fields

§peer_id: PeerId
§

PeerExpired

A peer’s mDNS presence expired — they left the LAN or stopped announcing. The lobby refreshes its online/offline indicators.

Fields

§peer_id: PeerId
§

Dialing

We’ve fired a dial command — useful for the UI to show “dialing…”.

Fields

§address: String
§

DialSucceeded

A user-initiated dial completed successfully.

Fields

§address: String
§peer_id: PeerId
§

DialFailed

A user-initiated dial failed.

Fields

§address: String
§error: String
§

Error

Non-fatal error.

Fields

§description: String
§

FileOffered

Someone (us or a peer) offered a file in a room.

Fields

§room_id: String
§file_id: String
§name: String
§size_bytes: u64
§sender_fingerprint: String
§

FileProgress

A chunk of an incoming transfer arrived. total_bytes is the announced size from the offer.

Fields

§file_id: String
§bytes_received: u64
§total_bytes: u64
§

FileReady

All chunks of a transfer received and SHA-256 verified.

Fields

§file_id: String
§

FileSaved

User saved a ready file to Downloads.

Fields

§file_id: String
§path: String
§

FileFailed

A transfer failed (hash mismatch, decrypt error, IO error).

Fields

§file_id: String
§reason: String
§

RotationRequested

A peer initiated a key rotation in a room we’re in. The UI surfaces a modal asking the user to enter the new passphrase.

Fields

§room_id: String
§rotator_fingerprint: String
§new_salt: Vec<u8>
§

TypingChanged

Someone in a room started typing. The UI re-reads typing peers from AppHandle::typers_in_room on each render; the event is just a nudge.

Fields

§room_id: String
§

MentionReceived

A received message included our fingerprint (full or short form). The TUI uses this to ring the terminal bell, even in muted rooms.

Fields

§room_id: String
§body: String
§

InboundDial

Phase A: an unknown peer has dialed us and Identify has completed. The TUI shows an accept/reject/trust modal with the peer’s short fingerprint. Routed through replace_modal_if_idle so it doesn’t clobber whatever the user is typing.

Fields

§peer_id: PeerId
§fingerprint: String

24-char fingerprint, freshly derived from the peer’s Ed25519 pubkey via Identify — proves they hold the matching key.

§address: String

String form of the listener-side multiaddr (the address as seen from our side of the connection). Mostly informational for the user; we persist it on accept so the lobby online dot tracks the peer.

§

SasCodeReady

Phase G: SAS code is ready on both sides — both ephemeral X25519 pubkeys exchanged + ECDH derived. The TUI shows the code (emoji + decimal) and the Match/Cancel buttons.

Fields

§room_id: String
§partner_fingerprint: String
§tx_id: String
§emoji_string: String
§emoji_labels: String
§decimal: String
§

SasVerified

Phase G: SAS completed — both sides confirmed the match. The partner’s fingerprint is now verified (per-room + global).

Fields

§room_id: String
§partner_fingerprint: String

Trait Implementations§

Source§

impl Clone for AppEvent

Source§

fn clone(&self) -> AppEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AppEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more