Skip to main content

Event

Enum Event 

Source
pub enum Event {
Show 39 variants Ready { user: User, chats: Vec<ChatSummary>, }, ProfilesLoaded(Vec<Profile>), ProfileActivated { user: User, chats: Vec<ChatSummary>, }, ProfileCreated { user: User, profiles: Vec<Profile>, chats: Vec<ChatSummary>, }, ProfileDeleted { profiles: Vec<Profile>, active_user: Option<User>, chats: Vec<ChatSummary>, }, ProfileDeleteFailed(String), SettingChanged(String), AutoDeleteLoaded(i64), AutoDeleteChanged(i64), AutoDeleteFailed(String), ChatDeletionLoaded { chat_ref: ChatRef, settings: ChatDeletionSettings, }, ChatDeletionChanged { chat_ref: ChatRef, settings: ChatDeletionSettings, }, ChatDeletionFailed(String), ConversationFeaturesLoaded { chat_ref: ChatRef, features: ChatFeatures, }, ConversationFeaturesChanged { chat_ref: ChatRef, features: ChatFeatures, }, ConversationFeaturesFailed(String), ChatDeleted { chat_ref: ChatRef, chats: Vec<ChatSummary>, }, ChatDeleteFailed(String), FileDownloadStarted { file_id: i64, path: String, }, FileDownloadFailed { file_id: i64, error: String, }, FileDownloadCancelled { file_id: i64, }, FileUpdated { chat_ref: ChatRef, message: Message, }, ServersLoaded(Vec<ServerEntry>), ServersUpdateFailed(String), ChatFeaturesLoaded(ChatFeatures), InvitationCreated(String), InvitationFailed(String), ConnectionStarted, ConnectionFailed(String), ChatLoaded { chat_ref: ChatRef, messages: Vec<Message>, }, ChatMarkedRead(ChatRef), ContactConnected { chats: Vec<ChatSummary>, chat_ref: ChatRef, }, MessageReceived { chat_ref: ChatRef, message: Message, }, ChatLoadFailed { chat_ref: ChatRef, error: String, }, MessageSent { chat_ref: ChatRef, text: String, }, MessageSendFailed { chat_ref: ChatRef, error: String, }, ReactionChanged { chat_ref: ChatRef, item_id: i64, emoji: String, added: bool, user_reacted: bool, }, NoActiveUser, Failed(String),
}

Variants§

§

Ready

Fields

§user: User
§

ProfilesLoaded(Vec<Profile>)

§

ProfileActivated

Fields

§user: User
§

ProfileCreated

Fields

§user: User
§profiles: Vec<Profile>
§

ProfileDeleted

Fields

§profiles: Vec<Profile>
§active_user: Option<User>
§

ProfileDeleteFailed(String)

§

SettingChanged(String)

§

AutoDeleteLoaded(i64)

§

AutoDeleteChanged(i64)

§

AutoDeleteFailed(String)

§

ChatDeletionLoaded

Fields

§chat_ref: ChatRef
§

ChatDeletionChanged

Fields

§chat_ref: ChatRef
§

ChatDeletionFailed(String)

§

ConversationFeaturesLoaded

Fields

§chat_ref: ChatRef
§features: ChatFeatures
§

ConversationFeaturesChanged

Fields

§chat_ref: ChatRef
§features: ChatFeatures
§

ConversationFeaturesFailed(String)

§

ChatDeleted

Fields

§chat_ref: ChatRef
§

ChatDeleteFailed(String)

§

FileDownloadStarted

Fields

§file_id: i64
§path: String
§

FileDownloadFailed

Fields

§file_id: i64
§error: String
§

FileDownloadCancelled

Fields

§file_id: i64
§

FileUpdated

Fields

§chat_ref: ChatRef
§message: Message
§

ServersLoaded(Vec<ServerEntry>)

§

ServersUpdateFailed(String)

§

ChatFeaturesLoaded(ChatFeatures)

§

InvitationCreated(String)

§

InvitationFailed(String)

§

ConnectionStarted

§

ConnectionFailed(String)

§

ChatLoaded

Fields

§chat_ref: ChatRef
§messages: Vec<Message>
§

ChatMarkedRead(ChatRef)

§

ContactConnected

Fields

§chat_ref: ChatRef
§

MessageReceived

Fields

§chat_ref: ChatRef
§message: Message
§

ChatLoadFailed

Fields

§chat_ref: ChatRef
§error: String
§

MessageSent

Fields

§chat_ref: ChatRef
§text: String
§

MessageSendFailed

Fields

§chat_ref: ChatRef
§error: String
§

ReactionChanged

Fields

§chat_ref: ChatRef
§item_id: i64
§emoji: String
§added: bool
§user_reacted: bool
§

NoActiveUser

§

Failed(String)

Trait Implementations§

Source§

impl Clone for SimplexEvent

Source§

fn clone(&self) -> Self

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 SimplexEvent

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, 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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.