Skip to main content

RumorProcessingResult

Enum RumorProcessingResult 

Source
pub enum RumorProcessingResult {
Show 13 variants TextMessage(Message), FileAttachment(Message), Reaction(Reaction), TypingIndicator { profile_id: String, until: u64, }, LeaveRequest { event_id: String, member_pubkey: String, }, WebxdcPeerAdvertisement { event_id: String, topic_id: String, node_addr: String, sender_npub: String, created_at: u64, }, WebxdcPeerLeft { event_id: String, topic_id: String, sender_npub: String, created_at: u64, }, UnknownEvent(StoredEvent), PivxPayment { gift_code: String, amount_piv: f64, address: Option<String>, message_id: String, event: StoredEvent, }, WallpaperChanged { sender_npub: String, created_at: u64, url: String, decryption_key: String, decryption_nonce: String, plaintext_hash: Option<String>, mime: Option<String>, blur: Option<u8>, dim: Option<u8>, event_id: String, }, Ignored, DeletionRequest { target_event_id: String, }, Edit { message_id: String, new_content: String, edited_at: u64, emoji_tags: Vec<EmojiTag>, event: StoredEvent, },
}
Expand description

Result of processing a rumor

Represents the different types of events that can result from processing a rumor. The caller is responsible for storing these results appropriately based on the conversation type.

Variants§

§

TextMessage(Message)

A text message (with optional reply reference)

§

FileAttachment(Message)

A file attachment message

§

Reaction(Reaction)

An emoji reaction to a message

§

TypingIndicator

A typing indicator update

Fields

§profile_id: String
§until: u64
§

LeaveRequest

A leave request from a group member (admin should auto-remove them)

Fields

§event_id: String

The event ID of the leave request (for deduplication)

§member_pubkey: String

The pubkey of the member requesting to leave (npub)

§

WebxdcPeerAdvertisement

A WebXDC peer advertisement for realtime channels

Fields

§event_id: String
§topic_id: String
§node_addr: String
§sender_npub: String
§created_at: u64
§

WebxdcPeerLeft

A WebXDC peer left signal (peer closed their Mini App)

Fields

§event_id: String
§topic_id: String
§sender_npub: String
§created_at: u64
§

UnknownEvent(StoredEvent)

Unknown event type - stored for future compatibility The frontend will render this as “Unknown Event” placeholder

§

PivxPayment

A PIVX payment promo code sent in chat

Fields

§gift_code: String

The promo code (5-char Base58)

§amount_piv: f64

Amount in PIV

§address: Option<String>

The PIVX address for balance checking (optional for older events)

§message_id: String

The message ID for this payment event

§event: StoredEvent

The stored event for persistence

§

WallpaperChanged

A per-DM wallpaper change. The encrypted Blossom file is referenced by URL + decryption key in the tags; the caller is responsible for the timestamp comparison (latest-write-wins against chat.wallpaper_ts) and the download + decrypt step.

Fields

§sender_npub: String

Sender’s npub (whoever set the wallpaper).

§created_at: u64

Rumor created_at (Unix seconds) — drives latest-write-wins.

§url: String

Encrypted file URL on Blossom.

§decryption_key: String

Hex-encoded AES key.

§decryption_nonce: String

Hex-encoded AES nonce.

§plaintext_hash: Option<String>

Optional plaintext SHA-256 (for caller integrity check).

§mime: Option<String>

Optional MIME hint (e.g. “image/png”) — informs cache extension.

§blur: Option<u8>

Blur (px, 0..=30). None falls back to the receiver’s default.

§dim: Option<u8>

Brightness percent (0..=100). None falls back to default.

§event_id: String

The rumor ID, used as the system-event row id.

§

Ignored

Event was ignored (invalid, expired, or should not be stored)

§

DeletionRequest

A NIP-09 deletion request — sender asks live clients to drop a previously-received message from local storage. Cooperative delete-for-everyone signal that pairs with Vector’s gift-wrap nuke at the relay layer (see vector_core::deletion).

Fields

§target_event_id: String

Hex id of the rumor being deleted (target’s ["e", ...] tag).

§

Edit

A message edit event

Fields

§message_id: String

The ID of the message being edited

§new_content: String

The new content

§edited_at: u64

Timestamp of the edit (milliseconds)

§emoji_tags: Vec<EmojiTag>

NIP-30 custom-emoji tags resolved from the new content

§event: StoredEvent

The stored event for persistence

Trait Implementations§

Source§

impl Clone for RumorProcessingResult

Source§

fn clone(&self) -> RumorProcessingResult

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 RumorProcessingResult

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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