Skip to main content

Message

Struct Message 

Source
pub struct Message {
Show 14 fields pub platform: Platform, pub user: String, pub text: String, pub color: Option<String>, pub badges: Vec<Badge>, pub reply_to: Option<String>, pub id: Option<String>, pub gone: Option<String>, pub note: Option<Note>, pub uid: Option<String>, pub extra: Extra, pub emotes: Option<Arc<EmoteSet>>, pub tags: Vec<Tag>, pub heat: f64,
}
Expand description

one chat line. heat is the channel’s heat snapshotted at arrival, so a message sent during a spike stays warm in scrollback. color is the user’s chat color (hex) if the platform sent one.

Fields§

§platform: Platform

where this line came from — a merged tab interleaves platforms, and each line keeps its origin for display.

§user: String§text: String§color: Option<String>§badges: Vec<Badge>§reply_to: Option<String>

username this message replies to, when the platform sent one.

§id: Option<String>

the platform’s message id, when the relay sent one.

§gone: Option<String>

set when a mod removed this line: the marker (“deleted”, “timed out 10m”…). the line stays in scrollback, struck through.

§note: Option<Note>

set when this line is an event (sub, raid, redemption, live…) rather than plain chat — it renders as an inline notice.

§uid: Option<String>

the sender’s heatsync paint-space id (twitch user id, kick_<id>, yt_<UC id>), when the relay sent one — keys name paints and colors.

§extra: Extra§emotes: Option<Arc<EmoteSet>>

this line’s own emote refs (see emote::segments_with), built once when the line lands; None for lines that carry none (history, system).

§tags: Vec<Tag>

leading labels (mention origin, feed [OP], [whisper]…); empty on ordinary chat.

§heat: f64

Implementations§

Source§

impl Message

Source

pub fn refs(&self) -> &EmoteSet

the per-message ref set, empty when the line carries none.

Trait Implementations§

Source§

impl Clone for Message

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 Message

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.