Skip to main content

Event

Enum Event 

Source
pub enum Event {
Show 58 variants Initialized { four_words: String, display_name: String, device_name: String, }, DisplayNameUpdated { old_name: String, new_name: String, }, NetworkingStarted { listen_address: String, connection_identity: String, }, NetworkingStopped, PeerConnected { peer_four_words: String, }, ExternalAddressDiscovered { address: String, }, ConnectionFailed { peer_four_words: String, reason: String, }, EntityCreated { entity_id: String, name: String, entity_type: EntityType, created_by: String, }, EntityLinkedToNetwork { entity_id: String, four_words: String, }, EntitySynced { entity_id: String, }, ParentOrganizationSet { entity_id: String, parent_org_id: String, }, EntityUpdated { entity_id: String, entity_type: EntityType, name: Option<String>, }, EntityDeleted { entity_id: String, entity_type: EntityType, }, MemberAdded { entity_type: EntityType, entity_id: String, member_id: String, role: String, }, MemberRemoved { entity_type: EntityType, entity_id: String, member_id: String, }, MemberRoleChanged { entity_type: EntityType, entity_id: String, member_id: String, old_role: String, new_role: String, }, OrganizationMemberRemoved { org_id: String, member_id: String, removed_from: Vec<(EntityType, String)>, }, PermissionOverrideSet { entity_type: EntityType, entity_id: String, member_id: String, resource_type: String, access_level: String, }, PermissionOverrideRemoved { entity_type: EntityType, entity_id: String, member_id: String, resource_type: String, }, MessageSent { message_id: String, entity_id: String, entity_type: EntityType, author: String, text: String, }, MessageReceived { message_id: String, entity_id: String, entity_type: EntityType, author: String, text: String, }, DirectMessageSent { message_ids: Vec<String>, recipients: Vec<String>, }, MessageDeleted { message_id: String, entity_id: String, entity_type: EntityType, }, MessageEdited { message_id: String, entity_id: String, entity_type: EntityType, new_text: String, edited_at: u64, }, ReactionAdded { message_id: String, entity_id: String, entity_type: EntityType, emoji: String, reactor_id: String, }, ReactionRemoved { message_id: String, entity_id: String, entity_type: EntityType, emoji: String, reactor_id: String, }, InviteCreated { invite_id: String, recipient_id: String, entity_type: EntityType, entity_id: String, role: String, }, InviteAccepted { invite_id: String, recipient_id: String, entity_id: String, }, InviteRejected { invite_id: String, }, InviteRevoked { invite_id: String, }, FileWritten { entity_id: String, disk_type: DiskTypeArg, path: String, size_bytes: u64, }, FileDeleted { entity_id: String, disk_type: DiskTypeArg, path: String, }, DirectoryCreated { entity_id: String, disk_type: DiskTypeArg, path: String, }, KanbanBoardCreated { board_id: String, entity_id: String, board_name: String, }, KanbanColumnCreated { column_id: String, board_id: String, column_name: String, }, KanbanCardCreated { card_id: String, column_id: String, title: String, }, KanbanCardMoved { card_id: String, from_column_id: String, to_column_id: String, }, KanbanCardUpdated { card_id: String, }, KanbanCardDeleted { card_id: String, }, KanbanBoardUpdated { board_id: String, name: Option<String>, }, KanbanBoardDeleted { board_id: String, }, CallStarted { call_id: String, entity_id: String, }, CallJoined { call_id: String, }, CallLeft { call_id: String, }, VideoToggled { call_id: String, enabled: bool, }, AudioToggled { call_id: String, enabled: bool, }, ScreenShareStarted { call_id: String, }, ScreenShareStopped { call_id: String, }, ContactCreated { contact_id: String, display_name: String, four_words: Option<String>, }, ContactUpdated { contact_id: String, display_name: Option<String>, is_favourite: Option<bool>, }, ContactDeleted { contact_id: String, }, ContactLinked { contact_id: String, four_words: String, }, ContactFavouriteSet { four_words: String, }, ContactFavouriteRemoved { four_words: String, }, WebsiteCreated { entity_id: String, website_root_hash: String, published_at: i64, size_bytes: usize, }, WebsiteUpdated { entity_id: String, website_root_hash: String, updated_at: i64, size_bytes: usize, }, WebsiteDeleted { entity_id: String, }, CommandFailed { command_type: String, error: String, },
}
Expand description

Events describe what changed as a result of a command.

Events are:

  • Immutable records of what happened
  • Used to update UI reactively
  • Can be replayed for debugging/testing
  • Broadcast to subscribers

Variants§

§

Initialized

Application was initialized

Fields

§four_words: String
§display_name: String
§device_name: String
§

DisplayNameUpdated

Display name was updated

Fields

§old_name: String
§new_name: String
§

NetworkingStarted

Networking started

Fields

§listen_address: String
§connection_identity: String
§

NetworkingStopped

Networking stopped

§

PeerConnected

Connected to a peer

Fields

§peer_four_words: String
§

ExternalAddressDiscovered

External address discovered

Fields

§address: String
§

ConnectionFailed

Connection failed

Fields

§peer_four_words: String
§reason: String
§

EntityCreated

Entity was created

Fields

§entity_id: String
§name: String
§entity_type: EntityType
§created_by: String
§

EntityLinkedToNetwork

Entity was linked to network

Fields

§entity_id: String
§four_words: String
§

EntitySynced

Entity was synced with network

Fields

§entity_id: String
§

ParentOrganizationSet

Parent organization was set

Fields

§entity_id: String
§parent_org_id: String
§

EntityUpdated

Entity was updated

Fields

§entity_id: String
§entity_type: EntityType
§

EntityDeleted

Entity was deleted

Fields

§entity_id: String
§entity_type: EntityType
§

MemberAdded

Member was added to an entity

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§role: String
§

MemberRemoved

Member was removed from an entity

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§

MemberRoleChanged

Member’s role was changed

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§old_role: String
§new_role: String
§

OrganizationMemberRemoved

Member was removed from organization and child entities

Fields

§org_id: String
§member_id: String
§removed_from: Vec<(EntityType, String)>
§

PermissionOverrideSet

Permission override was set

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§resource_type: String
§access_level: String
§

PermissionOverrideRemoved

Permission override was removed

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§resource_type: String
§

MessageSent

Message was sent

Fields

§message_id: String
§entity_id: String
§entity_type: EntityType
§author: String
§text: String
§

MessageReceived

Message was received

Fields

§message_id: String
§entity_id: String
§entity_type: EntityType
§author: String
§text: String
§

DirectMessageSent

Direct message was sent

Fields

§message_ids: Vec<String>
§recipients: Vec<String>
§

MessageDeleted

Message was deleted

Fields

§message_id: String
§entity_id: String
§entity_type: EntityType
§

MessageEdited

Message was edited

Fields

§message_id: String
§entity_id: String
§entity_type: EntityType
§new_text: String
§edited_at: u64
§

ReactionAdded

Reaction was added to a message

Fields

§message_id: String
§entity_id: String
§entity_type: EntityType
§emoji: String
§reactor_id: String
§

ReactionRemoved

Reaction was removed from a message

Fields

§message_id: String
§entity_id: String
§entity_type: EntityType
§emoji: String
§reactor_id: String
§

InviteCreated

Invite was created

Fields

§invite_id: String
§recipient_id: String
§entity_type: EntityType
§entity_id: String
§role: String
§

InviteAccepted

Invite was accepted

Fields

§invite_id: String
§recipient_id: String
§entity_id: String
§

InviteRejected

Invite was rejected

Fields

§invite_id: String
§

InviteRevoked

Invite was revoked

Fields

§invite_id: String
§

FileWritten

File was written

Fields

§entity_id: String
§disk_type: DiskTypeArg
§path: String
§size_bytes: u64
§

FileDeleted

File was deleted

Fields

§entity_id: String
§disk_type: DiskTypeArg
§path: String
§

DirectoryCreated

Directory was created

Fields

§entity_id: String
§disk_type: DiskTypeArg
§path: String
§

KanbanBoardCreated

Kanban board was created

Fields

§board_id: String
§entity_id: String
§board_name: String
§

KanbanColumnCreated

Kanban column was created

Fields

§column_id: String
§board_id: String
§column_name: String
§

KanbanCardCreated

Kanban card was created

Fields

§card_id: String
§column_id: String
§title: String
§

KanbanCardMoved

Kanban card was moved

Fields

§card_id: String
§from_column_id: String
§to_column_id: String
§

KanbanCardUpdated

Kanban card was updated

Fields

§card_id: String
§

KanbanCardDeleted

Kanban card was deleted

Fields

§card_id: String
§

KanbanBoardUpdated

Kanban board was updated

Fields

§board_id: String
§

KanbanBoardDeleted

Kanban board was deleted

Fields

§board_id: String
§

CallStarted

Call started

Fields

§call_id: String
§entity_id: String
§

CallJoined

Joined a call

Fields

§call_id: String
§

CallLeft

Left a call

Fields

§call_id: String
§

VideoToggled

Video toggled

Fields

§call_id: String
§enabled: bool
§

AudioToggled

Audio toggled

Fields

§call_id: String
§enabled: bool
§

ScreenShareStarted

Screen sharing started

Fields

§call_id: String
§

ScreenShareStopped

Screen sharing stopped

Fields

§call_id: String
§

ContactCreated

Contact was created

Fields

§contact_id: String
§display_name: String
§four_words: Option<String>
§

ContactUpdated

Contact was updated

Fields

§contact_id: String
§display_name: Option<String>
§is_favourite: Option<bool>
§

ContactDeleted

Contact was deleted

Fields

§contact_id: String
§

ContactLinked

Contact was linked to network identity

Fields

§contact_id: String
§four_words: String
§

ContactFavouriteSet

Contact was set as favourite

Fields

§four_words: String
§

ContactFavouriteRemoved

Contact was removed from favourites

Fields

§four_words: String
§

WebsiteCreated

A website was created/published for an entity

Fields

§entity_id: String
§website_root_hash: String
§published_at: i64
§size_bytes: usize
§

WebsiteUpdated

A website was updated

Fields

§entity_id: String
§website_root_hash: String
§updated_at: i64
§size_bytes: usize
§

WebsiteDeleted

A website was deleted

Fields

§entity_id: String
§

CommandFailed

An error occurred while processing a command

Fields

§command_type: String
§error: String

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Event

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> 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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,